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
|
|
@ -8,6 +8,24 @@ Version 3.0.1 (in progress)
|
||||||
2014-05-01: olly
|
2014-05-01: olly
|
||||||
[PHP] The generated __isset() method now returns true for read-only properties.
|
[PHP] The generated __isset() method now returns true for read-only properties.
|
||||||
|
|
||||||
|
2014-04-24: kwwette
|
||||||
|
Fix {python|perl5|ruby|tcl}/java examples
|
||||||
|
|
||||||
|
In Lib/gcj/cni.i, for compatibility with newer gcj versions:
|
||||||
|
|
||||||
|
- remove JvAllocObject() which gcj no longer defines, from gcj Changelog:
|
||||||
|
2004-04-16 Bryce McKinlay <mckinlay@redhat.com>
|
||||||
|
* gcj/cni.h (JvAllocObject): Remove these obsolete,
|
||||||
|
undocumented CNI calls.
|
||||||
|
|
||||||
|
- change JvCreateJavaVM() argument from void* to JvVMInitArgs*, from gcj Changelog:
|
||||||
|
2005-02-23 Thomas Fitzsimmons <fitzsim@redhat.com>
|
||||||
|
PR libgcj/16923
|
||||||
|
...
|
||||||
|
(JvCreateJavaVM): Declare vm_args as JvVMInitArgs* rather than void*.
|
||||||
|
|
||||||
|
*** POTENTIAL INCOMPATIBILITY ***
|
||||||
|
|
||||||
2014-04-08: wsfulton
|
2014-04-08: wsfulton
|
||||||
SF Bug #1366 - Remove duplicate declarations of strtoimax and strtoumax in inttypes.i
|
SF Bug #1366 - Remove duplicate declarations of strtoimax and strtoumax in inttypes.i
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -6,6 +6,7 @@ constants2
|
||||||
extend
|
extend
|
||||||
funcptr
|
funcptr
|
||||||
import
|
import
|
||||||
|
java
|
||||||
multimap
|
multimap
|
||||||
multiple_inheritance
|
multiple_inheritance
|
||||||
pointer
|
pointer
|
||||||
|
|
|
||||||
|
|
@ -8,15 +8,15 @@ LIBS = -lm
|
||||||
check: build
|
check: build
|
||||||
$(MAKE) -f $(TOP)/Makefile perl5_run
|
$(MAKE) -f $(TOP)/Makefile perl5_run
|
||||||
|
|
||||||
build: Example.class
|
build: Example.class Example.h
|
||||||
$(MAKE) -f $(TOP)/Makefile CXXSRCS='$(CXXSRCS)' SWIG='$(SWIG)' \
|
$(MAKE) -f $(TOP)/Makefile CXXSRCS='$(CXXSRCS)' SWIG='$(SWIG)' \
|
||||||
TARGET='$(TARGET)' INTERFACE='$(INTERFACE)' CXX="gcj" \
|
TARGET='$(TARGET)' INTERFACE='$(INTERFACE)' \
|
||||||
CXXSHARED="gcj -fpic -shared Example.class" PERL5_CCFLAGS='' PERL5_EXP='' LIBS="-lstdc++" perl5_cpp
|
CXXSHARED="gcj -fpic -shared Example.class" PERL5_CCFLAGS='' PERL5_EXP='' LIBS="-lstdc++" perl5_cpp
|
||||||
|
|
||||||
clean:
|
clean:
|
||||||
$(MAKE) -f $(TOP)/Makefile perl5_clean
|
$(MAKE) -f $(TOP)/Makefile perl5_clean
|
||||||
rm -f *.class Example.h
|
rm -f *.class Example.h
|
||||||
|
|
||||||
Example.class: Example.java
|
Example.class Example.h: Example.java
|
||||||
gcj -fPIC -C -c -g Example.java
|
gcj -fPIC -C -c -g Example.java
|
||||||
gcjh Example
|
gcjh Example.class
|
||||||
|
|
|
||||||
|
|
@ -6,10 +6,11 @@ INTERFACE = example.i
|
||||||
LIBS = -lm
|
LIBS = -lm
|
||||||
|
|
||||||
check: build
|
check: build
|
||||||
|
$(MAKE) -f $(TOP)/Makefile python_run
|
||||||
|
|
||||||
build: Example.class
|
build: Example.class Example.h
|
||||||
$(MAKE) -f $(TOP)/Makefile CXXSRCS='$(CXXSRCS)' SWIG='$(SWIG)' \
|
$(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
|
CXXSHARED="gcj -fpic -shared Example.class" DEFS='' LIBS="-lstdc++" python_cpp
|
||||||
|
|
||||||
clean:
|
clean:
|
||||||
|
|
@ -17,6 +18,6 @@ clean:
|
||||||
rm -f $(TARGET).py
|
rm -f $(TARGET).py
|
||||||
rm -f *.class Example.h
|
rm -f *.class Example.h
|
||||||
|
|
||||||
Example.class: Example.java
|
Example.class Example.h: Example.java
|
||||||
gcj -fPIC -C -c -g Example.java
|
gcj -fPIC -C -c -g Example.java
|
||||||
gcjh Example
|
gcjh Example.class
|
||||||
|
|
|
||||||
|
|
@ -7,3 +7,7 @@
|
||||||
|
|
||||||
|
|
||||||
%include Example.h
|
%include Example.h
|
||||||
|
|
||||||
|
%extend Example {
|
||||||
|
~Example() {}
|
||||||
|
}
|
||||||
|
|
|
||||||
|
|
@ -8,15 +8,15 @@ LIBS = -lm
|
||||||
check: build
|
check: build
|
||||||
$(MAKE) -f $(TOP)/Makefile ruby_run
|
$(MAKE) -f $(TOP)/Makefile ruby_run
|
||||||
|
|
||||||
build: Example.class
|
build: Example.class Example.h
|
||||||
$(MAKE) -f $(TOP)/Makefile CXXSRCS='$(CXXSRCS)' SWIG='$(SWIG)' \
|
$(MAKE) -f $(TOP)/Makefile CXXSRCS='$(CXXSRCS)' SWIG='$(SWIG)' \
|
||||||
TARGET='$(TARGET)' INTERFACE='$(INTERFACE)' CXX="gcj" \
|
TARGET='$(TARGET)' INTERFACE='$(INTERFACE)' \
|
||||||
CXXSHARED="gcj -fpic -shared Example.class" LIBS="-lstdc++" DEFS='' ruby_cpp
|
CXXSHARED="gcj -fpic -shared Example.class" LIBS="-lstdc++" DEFS='' ruby_cpp
|
||||||
|
|
||||||
clean:
|
clean:
|
||||||
$(MAKE) -f $(TOP)/Makefile ruby_clean
|
$(MAKE) -f $(TOP)/Makefile ruby_clean
|
||||||
rm -f *.class Example.h
|
rm -f *.class Example.h
|
||||||
|
|
||||||
Example.class: Example.java
|
Example.class Example.h: Example.java
|
||||||
gcj -fPIC -C -c -g Example.java
|
gcj -fPIC -C -c -g Example.java
|
||||||
gcjh Example
|
gcjh Example.class
|
||||||
|
|
|
||||||
|
|
@ -8,18 +8,15 @@ LIBS = -lm
|
||||||
check: build
|
check: build
|
||||||
$(MAKE) -f $(TOP)/Makefile tcl_run
|
$(MAKE) -f $(TOP)/Makefile tcl_run
|
||||||
|
|
||||||
build: Example.class
|
build: Example.class Example.h
|
||||||
$(MAKE) -f $(TOP)/Makefile CXXSRCS='$(CXXSRCS)' SWIG='$(SWIG)' \
|
$(MAKE) -f $(TOP)/Makefile CXXSRCS='$(CXXSRCS)' SWIG='$(SWIG)' \
|
||||||
TARGET='$(TARGET)' INTERFACE='$(INTERFACE)' CXX="gcj" \
|
TARGET='$(TARGET)' INTERFACE='$(INTERFACE)' \
|
||||||
TCL_CXXSHARED="gcj -fpic -shared Example.class " LIBS="-lstdc++" DEFS='' tcl_cpp
|
TCLCXXSHARED="gcj -fpic -shared Example.class " LIBS="-lstdc++" DEFS='' tcl_cpp
|
||||||
|
|
||||||
clean:
|
clean:
|
||||||
$(MAKE) -f $(TOP)/Makefile tcl_clean
|
$(MAKE) -f $(TOP)/Makefile tcl_clean
|
||||||
rm -f *.class Example.h
|
rm -f *.class Example.h
|
||||||
|
|
||||||
run:
|
Example.class Example.h: Example.java
|
||||||
tclsh runme.tcl
|
|
||||||
|
|
||||||
Example.class: Example.java
|
|
||||||
gcj -fPIC -C -c -g Example.java
|
gcj -fPIC -C -c -g Example.java
|
||||||
gcjh Example
|
gcjh Example.class
|
||||||
|
|
|
||||||
|
|
@ -4,10 +4,6 @@
|
||||||
|
|
||||||
%include <gcj/javaprims.i>
|
%include <gcj/javaprims.i>
|
||||||
|
|
||||||
extern jobject JvAllocObject (jclass cls);
|
|
||||||
|
|
||||||
extern jobject JvAllocObject (jclass cls, jsize sz);
|
|
||||||
|
|
||||||
extern void JvInitClass (jclass cls);
|
extern void JvInitClass (jclass cls);
|
||||||
|
|
||||||
extern jstring JvAllocString (jsize sz);
|
extern jstring JvAllocString (jsize sz);
|
||||||
|
|
@ -30,7 +26,7 @@ extern void *JvMalloc (jsize size);
|
||||||
|
|
||||||
extern void JvFree (void *ptr);
|
extern void JvFree (void *ptr);
|
||||||
|
|
||||||
extern jint JvCreateJavaVM (void* vm_args);
|
extern jint JvCreateJavaVM (JvVMInitArgs* vm_args);
|
||||||
|
|
||||||
extern java::lang::Thread* JvAttachCurrentThread (jstring name, java::lang::ThreadGroup* group);
|
extern java::lang::Thread* JvAttachCurrentThread (jstring name, java::lang::ThreadGroup* group);
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -252,7 +252,7 @@ java.actionexample:
|
||||||
echo "skipping Examples/$(LANGUAGE)/java $(ACTION) (gcj test)"; \
|
echo "skipping Examples/$(LANGUAGE)/java $(ACTION) (gcj test)"; \
|
||||||
else \
|
else \
|
||||||
echo $(ACTION)ing Examples/$(LANGUAGE)/java; \
|
echo $(ACTION)ing Examples/$(LANGUAGE)/java; \
|
||||||
(cd Examples/$(LANGUAGE)/java && $(MAKE) $(FLAGS) $(chk-set-env) $(ACTION)) \
|
(cd Examples/$(LANGUAGE)/java && $(MAKE) $(FLAGS) $(chk-set-env) $(ACTION) RUNPIPE=$(RUNPIPE)) \
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# Checks testcases in the test-suite excluding those which are known to be broken
|
# Checks testcases in the test-suite excluding those which are known to be broken
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue