Fix {python|perl5|ruby|tcl}/java examples
- in Lib/gcj/cni.i: remove JvAllocObject(), change
JvCreateJavaVM() argument from void* to JvVMInitArgs*
- in Examples/{python|perl5|ruby|tcl}/java/Makefile:
pass full class name to gcjh, add Example.h as dependency,
do not override CXX for compiling C++ sources
- in Examples/python/java/example.i:
add destructor to class to prevent memory loss complaint
This commit is contained in:
parent
d5b765d388
commit
b6c1889c08
9 changed files with 43 additions and 26 deletions
|
|
@ -6,10 +6,11 @@ INTERFACE = example.i
|
|||
LIBS = -lm
|
||||
|
||||
check: build
|
||||
$(MAKE) -f $(TOP)/Makefile python_run
|
||||
|
||||
build: Example.class
|
||||
build: Example.class Example.h
|
||||
$(MAKE) -f $(TOP)/Makefile CXXSRCS='$(CXXSRCS)' SWIG='$(SWIG)' \
|
||||
TARGET='$(TARGET)' INTERFACE='$(INTERFACE)' CXX="gcj" \
|
||||
TARGET='$(TARGET)' INTERFACE='$(INTERFACE)' \
|
||||
CXXSHARED="gcj -fpic -shared Example.class" DEFS='' LIBS="-lstdc++" python_cpp
|
||||
|
||||
clean:
|
||||
|
|
@ -17,6 +18,6 @@ clean:
|
|||
rm -f $(TARGET).py
|
||||
rm -f *.class Example.h
|
||||
|
||||
Example.class: Example.java
|
||||
Example.class Example.h: Example.java
|
||||
gcj -fPIC -C -c -g Example.java
|
||||
gcjh Example
|
||||
gcjh Example.class
|
||||
|
|
|
|||
|
|
@ -7,3 +7,7 @@
|
|||
|
||||
|
||||
%include Example.h
|
||||
|
||||
%extend Example {
|
||||
~Example() {}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue