add support for constants
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/branches/gsoc2009-sploving@11251 626c5289-ae23-0410-ae9c-e8d60b6d4f22
This commit is contained in:
parent
25f17ae463
commit
4e9cbd8a7c
15 changed files with 470 additions and 142 deletions
15
Examples/scilab/simple/makefile
Normal file
15
Examples/scilab/simple/makefile
Normal file
|
|
@ -0,0 +1,15 @@
|
|||
TOP = ../..
|
||||
SWIG = $(TOP)/../preinst-swig
|
||||
SRCS = example.c
|
||||
TARGET = example
|
||||
INTERFACE = example.i
|
||||
|
||||
all::
|
||||
$(MAKE) -f $(TOP)/Makefile SRCS='$(SRCS)' SWIG='$(SWIG)' \
|
||||
TARGET='$(TARGET)' INTERFACE='$(INTERFACE)' scilab
|
||||
|
||||
clean::
|
||||
$(MAKE) -f $(TOP)/Makefile scilab_clean
|
||||
rm -f *.sce *.so lib*lib.c
|
||||
|
||||
check: all
|
||||
|
|
@ -5,6 +5,7 @@ exec builder.sce;
|
|||
exec loader.sce;
|
||||
|
||||
// Call our gcd() function
|
||||
|
||||
x = 42;
|
||||
y = 105;
|
||||
g = gcd(x,y);
|
||||
|
|
@ -16,8 +17,8 @@ printf("The gcd of %d and %d is %d\n",x,y,g);
|
|||
Foo_get()
|
||||
|
||||
// Change its value
|
||||
Foo_set = 3.1415926
|
||||
Foo_set(3.1415926)
|
||||
|
||||
//See if the change took effect
|
||||
Foo_get
|
||||
Foo_get()
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue