$symname test
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk/SWIG@9198 626c5289-ae23-0410-ae9c-e8d60b6d4f22
This commit is contained in:
parent
b001bf16a5
commit
b775891bc6
2 changed files with 21 additions and 0 deletions
|
|
@ -230,6 +230,7 @@ CPP_TEST_CASES += \
|
||||||
smart_pointer_simple \
|
smart_pointer_simple \
|
||||||
smart_pointer_static \
|
smart_pointer_static \
|
||||||
smart_pointer_typedef \
|
smart_pointer_typedef \
|
||||||
|
special_variables \
|
||||||
static_array_member \
|
static_array_member \
|
||||||
static_const_member \
|
static_const_member \
|
||||||
static_const_member_2 \
|
static_const_member_2 \
|
||||||
|
|
|
||||||
20
Examples/test-suite/special_variables.i
Normal file
20
Examples/test-suite/special_variables.i
Normal file
|
|
@ -0,0 +1,20 @@
|
||||||
|
%module special_variables
|
||||||
|
|
||||||
|
// will fail to compile if $symname is not expanded
|
||||||
|
%typemap(argout) int i {
|
||||||
|
$symname(99);
|
||||||
|
}
|
||||||
|
|
||||||
|
%{
|
||||||
|
#define KKK_testmethod testmethod
|
||||||
|
#define KKK_teststaticmethod KKK::teststaticmethod
|
||||||
|
%}
|
||||||
|
|
||||||
|
%inline %{
|
||||||
|
void testmethod(int i) {}
|
||||||
|
struct KKK {
|
||||||
|
void testmethod(int i) {}
|
||||||
|
static void teststaticmethod(int i) {}
|
||||||
|
};
|
||||||
|
%}
|
||||||
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue