toolchain: refactor __restrict c++ compat macro

This commit is contained in:
anna 2021-07-21 22:23:46 +02:00
parent f99ad6162a
commit 5b1511ca57
Signed by: fef
GPG key ID: EC22E476DC2D3D84
2 changed files with 3 additions and 5 deletions

View file

@ -43,7 +43,7 @@ struct _neo_nstr_init_info {
* @param err: Error pointer
* @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.
@ -57,7 +57,7 @@ string *nstr(const char *__restrict s, error *err);
* @param err: Error pointer
* @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.

View file

@ -19,9 +19,7 @@
__neo_section(.fini_array) void (*__neo_fini_##fn)(void) = fn
#ifdef __cplusplus
# define __restrict
#else
# define __restrict restrict
# define restrict
#endif
/*