Last active
October 3, 2019 15:23
-
-
Save gengar/7925ce03bb69eabac3f291e7867c472d to your computer and use it in GitHub Desktop.
c-wrapperがMojave+Xcode11で動かなかったので
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
--- c-grammar.scm.orig 2019-10-04 00:07:42.000000000 +0900 | |
+++ c-grammar.scm 2019-10-03 22:17:39.000000000 +0900 | |
@@ -19,7 +19,7 @@ | |
XOR_ASSIGN OR_ASSIGN TYPENAME | |
TYPEDEF EXTERN STATIC AUTO REGISTER INLINE RESTRICT | |
- SIGNED UNSIGNED CONST VOLATILE | |
+ SIGNED UNSIGNED CONST VOLATILE NULLABLE NONNULL | |
STRUCT UNION ENUM ELLIPSIS RANGE | |
CASE DEFAULT IF ELSE SWITCH WHILE DO FOR GOTO CONTINUE BREAK RETURN | |
@@ -113,6 +113,8 @@ | |
(RESTRICT) : '() | |
(TYPENAME objc_non_empty_protocol_references) : (%TYPENAME $1) | |
(objc_non_empty_protocol_references) : '(id) | |
+ (NULLABLE) : '() | |
+ (NONNULL) : '() | |
) | |
(primary_expr | |
@@ -549,6 +551,8 @@ | |
(CONST) | |
(VOLATILE) | |
(RESTRICT) | |
+ (NULLABLE) | |
+ (NONNULL) | |
) | |
(array_qualifier | |
@@ -556,6 +560,8 @@ | |
(RESTRICT) | |
(CONST) | |
(VOLATILE) | |
+ (NULLABLE) | |
+ (NONNULL) | |
) | |
(array_qualifier_list |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
--- c-lex.c.orig 2019-10-04 00:07:27.000000000 +0900 | |
+++ c-lex.c 2019-10-04 00:19:50.000000000 +0900 | |
@@ -161,10 +161,13 @@ static void init_c_keyword_table() | |
{"asm", "ASM"}, | |
{"__asm", "ASM"}, | |
{"__asm__", "ASM"}, | |
+ {"restrict", "RESTRICT"}, | |
{"__restrict", "RESTRICT"}, | |
{"__restrict__", "RESTRICT"}, | |
{"__extension__", "EXTENSION"}, | |
{"__attribute__", "ATTRIBUTE"}, | |
+ {"_Nullable", "NULLABLE"}, | |
+ {"_Nonnull", "NONNULL"}, | |
{"@interface", "AT_INTERFACE"}, | |
{"@implementation", "AT_IMPLEMENTATION"}, | |
{"@end", "AT_END"}, |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment