/trunk/Examples/test-suite/tag_no_clash_with_variable.i
Swig | 33 lines | 17 code | 11 blank | 5 comment | 0 complexity | 88fd0def0b0526ce0943585ddc6ccb2c MD5 | raw file
Possible License(s): LGPL-2.1, Cube, GPL-3.0, 0BSD, GPL-2.0
- /* This is a test case for -*- C -*- mode. */
- %module tag_no_clash_with_variable
- %inline %{
- /* error_action is only a tag, not a type... */
- enum error_action {
- ERRACT_ABORT,
- ERRACT_EXIT,
- ERRACT_THROW
- };
- /* ... thus it does not clash with a variable of the same name. */
- enum error_action error_action;
- /* Likewise for structs: */
- struct buffalo {
- int foo;
- };
- struct buffalo buffalo;
- /* And for union */
- union onion {
- int cheese;
- };
- union onion onion;
-
- %}