complex can now be used as an identifier
Remove final vestiges of 'complex' keyword. Closes #252
This commit is contained in:
parent
8edb047785
commit
638ca8152d
5 changed files with 25 additions and 1 deletions
|
|
@ -718,6 +718,7 @@ C_TEST_CASES += \
|
|||
nested_extend_c \
|
||||
nested_structs \
|
||||
newobject2 \
|
||||
not_ckeywords \
|
||||
overload_extend_c \
|
||||
overload_extend2 \
|
||||
preproc \
|
||||
|
|
|
|||
13
Examples/test-suite/not_c_keywords.i
Normal file
13
Examples/test-suite/not_c_keywords.i
Normal file
|
|
@ -0,0 +1,13 @@
|
|||
%module not_c_keywords
|
||||
|
||||
%extend ComplexStruct {
|
||||
void init() {
|
||||
$self->complex = 123;
|
||||
}
|
||||
}
|
||||
|
||||
%inline %{
|
||||
struct ComplexStruct {
|
||||
int complex; /* complex as variable name */
|
||||
};
|
||||
%}
|
||||
7
Examples/test-suite/python/not_c_keywords_runme.py
Normal file
7
Examples/test-suite/python/not_c_keywords_runme.py
Normal file
|
|
@ -0,0 +1,7 @@
|
|||
from not_c_keywords import *
|
||||
|
||||
cs = ComplexStruct()
|
||||
cs.init()
|
||||
if cs.complex != 123:
|
||||
raise RuntimeError("complex not correct")
|
||||
cs.complex = 456
|
||||
Loading…
Add table
Add a link
Reference in a new issue