/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
1/* This is a test case for -*- C -*- mode. */ 2%module tag_no_clash_with_variable 3 4%inline %{ 5 6/* error_action is only a tag, not a type... */ 7enum error_action { 8 ERRACT_ABORT, 9 ERRACT_EXIT, 10 ERRACT_THROW 11}; 12 13/* ... thus it does not clash with a variable of the same name. */ 14enum error_action error_action; 15 16/* Likewise for structs: */ 17 18struct buffalo { 19 int foo; 20}; 21 22struct buffalo buffalo; 23 24/* And for union */ 25 26union onion { 27 int cheese; 28}; 29 30union onion onion; 31 32%} 33