File: 05cd8336a76065cd89474d339d555abdade1a299.patch

package info (click to toggle)
camljava 0.3-2
  • links: PTS, VCS
  • area: main
  • in suites: buster
  • size: 572 kB
  • ctags: 892
  • sloc: ansic: 839; ml: 336; java: 302; makefile: 89
file content (78 lines) | stat: -rw-r--r-- 2,720 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
From: Xavier Leroy <xavier.leroy@inria.fr>
Date: Wed, 28 Dec 2016 11:35:43 +0100
Subject: Export the exception "Exception". Quick 2016 upgrade.

---
 Changes         | 6 ++++++
 Makefile.config | 6 +++---
 lib/jni.mli     | 3 +++
 lib/jnistubs.c  | 2 +-
 4 files changed, 13 insertions(+), 4 deletions(-)
 create mode 100644 Changes

diff --git a/Changes b/Changes
new file mode 100644
index 0000000..86a3c85
--- /dev/null
+++ b/Changes
@@ -0,0 +1,6 @@
+Current:
+- Export "exception Exception of obj" in jni.mli
+- Update Makefile.config to OpenJDK 8 for Linux/AMD64
+- Migration to Github
+
+Version 0.3, 2004-07-13
diff --git a/Makefile.config b/Makefile.config
index 133cd2d..cdb5211 100644
--- a/Makefile.config
+++ b/Makefile.config
@@ -13,11 +13,11 @@ JAVAC=javac -g
 
 ################### JNI interface #####################
 
-## Defaults are set for Sun's JDK 1.4.2 under Linux.  
+## Defaults are set for OpenJDK 8 under Linux/AMD64.
 ## For other platforms, adjust as required and tell us about it.
 
 # Home location for the JDK.  Only used for setting other variables below. 
-JDKHOME=/usr/lib/jvm/java-6-sun
+JDKHOME=/usr/lib/jvm/java-8-openjdk-amd64
 
 # Current architecture identification string, as intended by the JDK.
 # Common values for x86 architectures are "i386" or "amd64". You can find it
@@ -29,7 +29,7 @@ ARCH=amd64
 JNIINCLUDES=-I$(JDKHOME)/include -I$(JDKHOME)/include/linux
 
 # The library to link with to get the JNI
-JNILIBS=-ljava
+JNILIBS=-ljvm
 
 # Additional link-time options to pass to $(CC) when linking with $(JNILIBS)
 JNILIBOPTS=-L$(JDKHOME)/jre/lib/$(ARCH)/ \
diff --git a/lib/jni.mli b/lib/jni.mli
index db71589..8f50b71 100644
--- a/lib/jni.mli
+++ b/lib/jni.mli
@@ -28,6 +28,9 @@ exception Null_pointer
         (* Exception raised by the operations below when they
            encounter a null object reference in arguments that must
            be non-null. *)
+exception Exception of obj
+        (* Exception raised by the method invocation functions below
+           when the Java method terminates on an unhandled exception. *)
 external is_null: obj -> bool = "camljava_IsNull"
         (* Determine if the given object reference is [null] *)
 external is_same_object: obj -> obj -> bool = "camljava_IsSameObject"
diff --git a/lib/jnistubs.c b/lib/jnistubs.c
index bfc6c9d..c0d4e75 100644
--- a/lib/jnistubs.c
+++ b/lib/jnistubs.c
@@ -924,7 +924,7 @@ value camljava_WrapCamlObject(value vobj)
   value * wrapper = stat_alloc(sizeof(value));
   *wrapper = vobj;
   register_global_root(wrapper);
-  return copy_int64((int64) (value) wrapper);
+  return copy_int64((jlong) (value) wrapper);
 }
 
 void camljava_FreeWrapper(JNIEnv * env, jclass cls, jlong wrapper)