toolchain: refactor __restrict c++ compat macro
This commit is contained in:
parent
f99ad6162a
commit
5b1511ca57
2 changed files with 3 additions and 5 deletions
|
@ -43,7 +43,7 @@ struct _neo_nstr_init_info {
|
||||||
* @param err: Error pointer
|
* @param err: Error pointer
|
||||||
* @returns The converted string, unless an error occurred
|
* @returns The converted string, unless an error occurred
|
||||||
*/
|
*/
|
||||||
string *nstr(const char *__restrict s, error *err);
|
string *nstr(const char *restrict s, error *err);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Copy a regular C string to a neo string, but at most `maxsize` bytes.
|
* Copy a regular C string to a neo string, but at most `maxsize` bytes.
|
||||||
|
@ -57,7 +57,7 @@ string *nstr(const char *__restrict s, error *err);
|
||||||
* @param err: Error pointer
|
* @param err: Error pointer
|
||||||
* @returns The converted string, unless an error occurred
|
* @returns The converted string, unless an error occurred
|
||||||
*/
|
*/
|
||||||
string *nnstr(const char *__restrict s, usize maxsize, error *err);
|
string *nnstr(const char *restrict s, usize maxsize, error *err);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Get the Unicode code point in a string at the specified index.
|
* Get the Unicode code point in a string at the specified index.
|
||||||
|
|
|
@ -19,9 +19,7 @@
|
||||||
__neo_section(.fini_array) void (*__neo_fini_##fn)(void) = fn
|
__neo_section(.fini_array) void (*__neo_fini_##fn)(void) = fn
|
||||||
|
|
||||||
#ifdef __cplusplus
|
#ifdef __cplusplus
|
||||||
# define __restrict
|
# define restrict
|
||||||
#else
|
|
||||||
# define __restrict restrict
|
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|
|
Loading…
Reference in a new issue