PageRenderTime 13ms CodeModel.GetById 12ms app.highlight 0ms RepoModel.GetById 0ms app.codeStats 0ms

/tags/rel-1-3-25/SWIG/Examples/test-suite/name.i

#
Swig | 28 lines | 20 code | 5 blank | 3 comment | 0 complexity | 5f434739cd503e1571a6ed21a1c8c8a3 MD5 | raw file
Possible License(s): LGPL-2.1, Cube, GPL-3.0, 0BSD, GPL-2.0
 1/* This interface file tests whether SWIG/Guile handle the %rename and
 2   %name directives, which was not the case in 1.3a5.
 3*/
 4
 5%module name
 6
 7#pragma SWIG nowarn=121 // %name is deprecated. Use %rename instead.
 8
 9#ifdef SWIGGUILE
10%rename foo_1 "foo-2";
11#else
12%rename foo_1 "foo_2";
13#endif
14%inline %{
15void foo_1() {}
16%}
17
18#ifdef SWIGGUILE
19%name("bar-2")
20#else
21%name("bar_2")
22#endif
23%inline %{
24int bar_1 = 17;
25%}
26
27%name("Baz_2")
28%constant int Baz_1 = 47;