$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:
William S Fulton 2006-07-05 21:24:36 +00:00
commit b775891bc6
2 changed files with 21 additions and 0 deletions

View file

@ -230,6 +230,7 @@ CPP_TEST_CASES += \
smart_pointer_simple \
smart_pointer_static \
smart_pointer_typedef \
special_variables \
static_array_member \
static_const_member \
static_const_member_2 \

View 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) {}
};
%}