The great merge
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk@4141 626c5289-ae23-0410-ae9c-e8d60b6d4f22
This commit is contained in:
parent
6fcc22a1f8
commit
516036631c
1508 changed files with 125983 additions and 44037 deletions
9
SWIG/Examples/python/constants/.cvsignore
Normal file
9
SWIG/Examples/python/constants/.cvsignore
Normal file
|
|
@ -0,0 +1,9 @@
|
|||
*_wrap.c
|
||||
*_wrap.cxx
|
||||
*.dll
|
||||
*.dsw
|
||||
*.ncb
|
||||
*.opt
|
||||
*.plg
|
||||
Release
|
||||
Debug
|
||||
|
|
@ -13,6 +13,7 @@ static::
|
|||
TARGET='mypython' INTERFACE='$(INTERFACE)' python_static
|
||||
|
||||
clean::
|
||||
rm -f *_wrap* *.o *~ *.so mypython *.pyc .~* core
|
||||
$(MAKE) -f $(TOP)/Makefile python_clean
|
||||
rm -f $(TARGET).py
|
||||
|
||||
check: all
|
||||
|
|
|
|||
|
|
@ -19,19 +19,9 @@
|
|||
/* Neither should this (BAR isn't defined) */
|
||||
#define FOO (ICONST + BAR)
|
||||
|
||||
/* The following statements also produce constants */
|
||||
const int iconst = 37;
|
||||
const double fconst = 3.14;
|
||||
|
||||
%constant(double) PI = 3.14159;
|
||||
|
||||
/* Test address of operator */
|
||||
|
||||
%{
|
||||
static double blah = 1.2345;
|
||||
%}
|
||||
|
||||
%constant(double *) blahptr = &blah;
|
||||
/* The following directives also produce constants */
|
||||
|
||||
%constant int iconst = 37;
|
||||
%constant double fconst = 3.14;
|
||||
|
||||
|
||||
|
|
|
|||
|
|
@ -11,7 +11,7 @@ print "SCONST2 =", example.SCONST2, "(should be '\"Hello World\"')"
|
|||
print "EXPR =", example.EXPR, "(should be 48.5484)"
|
||||
print "iconst =", example.iconst, "(should be 37)"
|
||||
print "fconst =", example.fconst, "(should be 3.14)"
|
||||
print "PI =", example.PI, "(should be 3.14159)"
|
||||
|
||||
try:
|
||||
print "EXTERN = ", example.EXTERN, "(Arg! This shouldn't print anything)"
|
||||
except AttributeError:
|
||||
Loading…
Add table
Add a link
Reference in a new issue