Mercurial > pub > dyncall > bindings
annotate java/jdc/src/org_dyncall_DC.c @ 18:3bfef07b0cd9
- cleanup of non-working java binding, restart work, somewhat different interface
author | cslag |
---|---|
date | Wed, 30 Mar 2016 02:05:06 +0200 |
parents | 0cfcc391201f |
children |
rev | line source |
---|---|
0 | 1 #include "org_dyncall_DC.h" |
18
3bfef07b0cd9
- cleanup of non-working java binding, restart work, somewhat different interface
cslag
parents:
0
diff
changeset
|
2 #include "dyncall.h" |
3bfef07b0cd9
- cleanup of non-working java binding, restart work, somewhat different interface
cslag
parents:
0
diff
changeset
|
3 |
3bfef07b0cd9
- cleanup of non-working java binding, restart work, somewhat different interface
cslag
parents:
0
diff
changeset
|
4 jlong JNICALL Java_org_dyncall_DC_newCallVM(JNIEnv *pEnv, jclass clazz, jint mode, jint size) |
0 | 5 { |
18
3bfef07b0cd9
- cleanup of non-working java binding, restart work, somewhat different interface
cslag
parents:
0
diff
changeset
|
6 return (jlong)dcNewCallVM(mode, size); |
3bfef07b0cd9
- cleanup of non-working java binding, restart work, somewhat different interface
cslag
parents:
0
diff
changeset
|
7 //@@@ free |
0 | 8 } |
9 | |
18
3bfef07b0cd9
- cleanup of non-working java binding, restart work, somewhat different interface
cslag
parents:
0
diff
changeset
|
10 jlong JNICALL Java_org_dyncall_DC_load(JNIEnv *, jclass, jstring s) |
0 | 11 { |
18
3bfef07b0cd9
- cleanup of non-working java binding, restart work, somewhat different interface
cslag
parents:
0
diff
changeset
|
12 return dlLoadLibrary((const char*)s); |
3bfef07b0cd9
- cleanup of non-working java binding, restart work, somewhat different interface
cslag
parents:
0
diff
changeset
|
13 //@@@ free |
3bfef07b0cd9
- cleanup of non-working java binding, restart work, somewhat different interface
cslag
parents:
0
diff
changeset
|
14 } |
3bfef07b0cd9
- cleanup of non-working java binding, restart work, somewhat different interface
cslag
parents:
0
diff
changeset
|
15 |
3bfef07b0cd9
- cleanup of non-working java binding, restart work, somewhat different interface
cslag
parents:
0
diff
changeset
|
16 jlong JNICALL Java_org_dyncall_DC_find(JNIEnv *, jclass, jlong libhandle, jstring s) |
3bfef07b0cd9
- cleanup of non-working java binding, restart work, somewhat different interface
cslag
parents:
0
diff
changeset
|
17 { |
3bfef07b0cd9
- cleanup of non-working java binding, restart work, somewhat different interface
cslag
parents:
0
diff
changeset
|
18 return dlFindSymbol((DLLib*)libhandle, (const char*)s); |
0 | 19 } |
20 | |
18
3bfef07b0cd9
- cleanup of non-working java binding, restart work, somewhat different interface
cslag
parents:
0
diff
changeset
|
21 //jint JNICALL Java_org_dyncall_DC_symsCount(JNIEnv *, jclass, jlong symshandle) |
3bfef07b0cd9
- cleanup of non-working java binding, restart work, somewhat different interface
cslag
parents:
0
diff
changeset
|
22 //{ |
3bfef07b0cd9
- cleanup of non-working java binding, restart work, somewhat different interface
cslag
parents:
0
diff
changeset
|
23 // return dlSymsCount((DLSyms*)symshandle); |
3bfef07b0cd9
- cleanup of non-working java binding, restart work, somewhat different interface
cslag
parents:
0
diff
changeset
|
24 //} |
3bfef07b0cd9
- cleanup of non-working java binding, restart work, somewhat different interface
cslag
parents:
0
diff
changeset
|
25 |
3bfef07b0cd9
- cleanup of non-working java binding, restart work, somewhat different interface
cslag
parents:
0
diff
changeset
|
26 //jstring JNICALL Java_org_dyncall_DC_symsName(JNIEnv *, jclass, jlong symshandle, jint i) |
3bfef07b0cd9
- cleanup of non-working java binding, restart work, somewhat different interface
cslag
parents:
0
diff
changeset
|
27 //{ |
3bfef07b0cd9
- cleanup of non-working java binding, restart work, somewhat different interface
cslag
parents:
0
diff
changeset
|
28 // return dlSymsName((DLSyms*)symshandle, i); |
3bfef07b0cd9
- cleanup of non-working java binding, restart work, somewhat different interface
cslag
parents:
0
diff
changeset
|
29 //} |
3bfef07b0cd9
- cleanup of non-working java binding, restart work, somewhat different interface
cslag
parents:
0
diff
changeset
|
30 |
3bfef07b0cd9
- cleanup of non-working java binding, restart work, somewhat different interface
cslag
parents:
0
diff
changeset
|
31 void JNICALL Java_org_dyncall_DC_mode(JNIEnv *, jclass, jlong in_vm, jint i) |
0 | 32 { |
18
3bfef07b0cd9
- cleanup of non-working java binding, restart work, somewhat different interface
cslag
parents:
0
diff
changeset
|
33 dcMode((DCCallVM*)in_vm, i); |
0 | 34 } |
35 | |
18
3bfef07b0cd9
- cleanup of non-working java binding, restart work, somewhat different interface
cslag
parents:
0
diff
changeset
|
36 void JNICALL Java_org_dyncall_DC_reset(JNIEnv *, jclass, jlong in_vm) |
3bfef07b0cd9
- cleanup of non-working java binding, restart work, somewhat different interface
cslag
parents:
0
diff
changeset
|
37 { |
3bfef07b0cd9
- cleanup of non-working java binding, restart work, somewhat different interface
cslag
parents:
0
diff
changeset
|
38 dcReset((DCCallVM*)in_vm); |
3bfef07b0cd9
- cleanup of non-working java binding, restart work, somewhat different interface
cslag
parents:
0
diff
changeset
|
39 } |
3bfef07b0cd9
- cleanup of non-working java binding, restart work, somewhat different interface
cslag
parents:
0
diff
changeset
|
40 |
3bfef07b0cd9
- cleanup of non-working java binding, restart work, somewhat different interface
cslag
parents:
0
diff
changeset
|
41 void JNICALL Java_org_dyncall_DC_argBool(JNIEnv *, jclass, jlong in_vm, jboolean b) |
0 | 42 { |
18
3bfef07b0cd9
- cleanup of non-working java binding, restart work, somewhat different interface
cslag
parents:
0
diff
changeset
|
43 dcPushBool((DCCallVM*)in_vm, b); |
0 | 44 } |
18
3bfef07b0cd9
- cleanup of non-working java binding, restart work, somewhat different interface
cslag
parents:
0
diff
changeset
|
45 |
3bfef07b0cd9
- cleanup of non-working java binding, restart work, somewhat different interface
cslag
parents:
0
diff
changeset
|
46 void JNICALL Java_org_dyncall_DC_argChar(JNIEnv *, jclass, jlong in_vm, jbyte b) |
3bfef07b0cd9
- cleanup of non-working java binding, restart work, somewhat different interface
cslag
parents:
0
diff
changeset
|
47 { |
3bfef07b0cd9
- cleanup of non-working java binding, restart work, somewhat different interface
cslag
parents:
0
diff
changeset
|
48 dcPushChar((DCCallVM*)in_vm, b); |
3bfef07b0cd9
- cleanup of non-working java binding, restart work, somewhat different interface
cslag
parents:
0
diff
changeset
|
49 } |
3bfef07b0cd9
- cleanup of non-working java binding, restart work, somewhat different interface
cslag
parents:
0
diff
changeset
|
50 |
0 | 51 void JNICALL Java_org_dyncall_DC_argShort(JNIEnv *, jclass, jlong in_vm, jshort s) |
52 { | |
18
3bfef07b0cd9
- cleanup of non-working java binding, restart work, somewhat different interface
cslag
parents:
0
diff
changeset
|
53 dcPushShort((DCCallVM*)in_vm, s); |
0 | 54 } |
55 | |
56 void JNICALL Java_org_dyncall_DC_argInt(JNIEnv *, jclass, jlong in_vm, jint i) | |
57 { | |
18
3bfef07b0cd9
- cleanup of non-working java binding, restart work, somewhat different interface
cslag
parents:
0
diff
changeset
|
58 dcPushInt((DCCallVM*)in_vm, i); |
0 | 59 } |
60 | |
18
3bfef07b0cd9
- cleanup of non-working java binding, restart work, somewhat different interface
cslag
parents:
0
diff
changeset
|
61 void JNICALL Java_org_dyncall_DC_argLong(JNIEnv *, jclass, jlong in_vm, jlong l) |
0 | 62 { |
18
3bfef07b0cd9
- cleanup of non-working java binding, restart work, somewhat different interface
cslag
parents:
0
diff
changeset
|
63 dcPushLong((DCCallVM*)in_vm, l); |
3bfef07b0cd9
- cleanup of non-working java binding, restart work, somewhat different interface
cslag
parents:
0
diff
changeset
|
64 } |
3bfef07b0cd9
- cleanup of non-working java binding, restart work, somewhat different interface
cslag
parents:
0
diff
changeset
|
65 |
3bfef07b0cd9
- cleanup of non-working java binding, restart work, somewhat different interface
cslag
parents:
0
diff
changeset
|
66 void JNICALL Java_org_dyncall_DC_argLongLong(JNIEnv *, jclass, jlong in_vm, jlong l) |
3bfef07b0cd9
- cleanup of non-working java binding, restart work, somewhat different interface
cslag
parents:
0
diff
changeset
|
67 { |
3bfef07b0cd9
- cleanup of non-working java binding, restart work, somewhat different interface
cslag
parents:
0
diff
changeset
|
68 dcPushLongLong((DCCallVM*)in_vm, l); |
0 | 69 } |
70 | |
71 void JNICALL Java_org_dyncall_DC_argFloat(JNIEnv *, jclass, jlong in_vm, jfloat f) | |
72 { | |
18
3bfef07b0cd9
- cleanup of non-working java binding, restart work, somewhat different interface
cslag
parents:
0
diff
changeset
|
73 dcPushFloat((DCCallVM*)in_vm, f); |
0 | 74 } |
75 | |
76 void JNICALL Java_org_dyncall_DC_argDouble(JNIEnv *, jclass, jlong in_vm, jdouble d) | |
77 { | |
18
3bfef07b0cd9
- cleanup of non-working java binding, restart work, somewhat different interface
cslag
parents:
0
diff
changeset
|
78 dcPushDouble((DCCallVM*)in_vm, d); |
0 | 79 } |
80 | |
81 void JNICALL Java_org_dyncall_DC_argPointer__JJ(JNIEnv *, jclass, jlong in_vm, jlong l) | |
82 { | |
18
3bfef07b0cd9
- cleanup of non-working java binding, restart work, somewhat different interface
cslag
parents:
0
diff
changeset
|
83 dcPushPointer((DCCallVM*)in_vm, (DCpointer)l); |
0 | 84 } |
85 | |
86 void JNICALL Java_org_dyncall_DC_argPointer__JLjava_lang_Object_2(JNIEnv *, jclass, jlong in_vm, jobject o) | |
87 { | |
18
3bfef07b0cd9
- cleanup of non-working java binding, restart work, somewhat different interface
cslag
parents:
0
diff
changeset
|
88 dcPushPointer((DCCallVM*)in_vm, (DCpointer)o); |
0 | 89 } |
90 | |
18
3bfef07b0cd9
- cleanup of non-working java binding, restart work, somewhat different interface
cslag
parents:
0
diff
changeset
|
91 void JNICALL Java_org_dyncall_DC_argString(JNIEnv *, jclass, jlong in_vm, jstring s) |
0 | 92 { |
18
3bfef07b0cd9
- cleanup of non-working java binding, restart work, somewhat different interface
cslag
parents:
0
diff
changeset
|
93 dcPushPointer((DCCallVM*)in_vm, (DCpointer)s); |
0 | 94 } |
95 | |
96 void JNICALL Java_org_dyncall_DC_callVoid (JNIEnv *, jclass, jlong in_vm, jlong in_target) | |
97 { | |
18
3bfef07b0cd9
- cleanup of non-working java binding, restart work, somewhat different interface
cslag
parents:
0
diff
changeset
|
98 dcCallVoid((DCCallVM*)in_vm, (DCpointer)target) |
3bfef07b0cd9
- cleanup of non-working java binding, restart work, somewhat different interface
cslag
parents:
0
diff
changeset
|
99 } |
3bfef07b0cd9
- cleanup of non-working java binding, restart work, somewhat different interface
cslag
parents:
0
diff
changeset
|
100 |
3bfef07b0cd9
- cleanup of non-working java binding, restart work, somewhat different interface
cslag
parents:
0
diff
changeset
|
101 jboolean JNICALL Java_org_dyncall_DC_callBool(JNIEnv *, jclass, jlong in_vm, jlong target) |
3bfef07b0cd9
- cleanup of non-working java binding, restart work, somewhat different interface
cslag
parents:
0
diff
changeset
|
102 { |
3bfef07b0cd9
- cleanup of non-working java binding, restart work, somewhat different interface
cslag
parents:
0
diff
changeset
|
103 return dcCallBool((DCCallVM*)in_vm, (DCpointer)target) |
3bfef07b0cd9
- cleanup of non-working java binding, restart work, somewhat different interface
cslag
parents:
0
diff
changeset
|
104 } |
3bfef07b0cd9
- cleanup of non-working java binding, restart work, somewhat different interface
cslag
parents:
0
diff
changeset
|
105 |
3bfef07b0cd9
- cleanup of non-working java binding, restart work, somewhat different interface
cslag
parents:
0
diff
changeset
|
106 jbyte JNICALL Java_org_dyncall_DC_callChar(JNIEnv *, jclass, jlong in_vm, jlong target) |
3bfef07b0cd9
- cleanup of non-working java binding, restart work, somewhat different interface
cslag
parents:
0
diff
changeset
|
107 { |
3bfef07b0cd9
- cleanup of non-working java binding, restart work, somewhat different interface
cslag
parents:
0
diff
changeset
|
108 return dcCallChar((DCCallVM*)in_vm, (DCpointer)target) |
0 | 109 } |
110 | |
18
3bfef07b0cd9
- cleanup of non-working java binding, restart work, somewhat different interface
cslag
parents:
0
diff
changeset
|
111 jshort JNICALL Java_org_dyncall_DC_callShort(JNIEnv *, jclass, jlong in_vm, jlong target) |
3bfef07b0cd9
- cleanup of non-working java binding, restart work, somewhat different interface
cslag
parents:
0
diff
changeset
|
112 { |
3bfef07b0cd9
- cleanup of non-working java binding, restart work, somewhat different interface
cslag
parents:
0
diff
changeset
|
113 return dcCallShort((DCCallVM*)in_vm, (DCpointer)target) |
3bfef07b0cd9
- cleanup of non-working java binding, restart work, somewhat different interface
cslag
parents:
0
diff
changeset
|
114 } |
3bfef07b0cd9
- cleanup of non-working java binding, restart work, somewhat different interface
cslag
parents:
0
diff
changeset
|
115 |
3bfef07b0cd9
- cleanup of non-working java binding, restart work, somewhat different interface
cslag
parents:
0
diff
changeset
|
116 jint JNICALL Java_org_dyncall_DC_callInt(JNIEnv *, jclass, jlong in_vm, jlong target) |
0 | 117 { |
18
3bfef07b0cd9
- cleanup of non-working java binding, restart work, somewhat different interface
cslag
parents:
0
diff
changeset
|
118 return dcCallInt((DCCallVM*)in_vm, (DCpointer)target) |
3bfef07b0cd9
- cleanup of non-working java binding, restart work, somewhat different interface
cslag
parents:
0
diff
changeset
|
119 } |
3bfef07b0cd9
- cleanup of non-working java binding, restart work, somewhat different interface
cslag
parents:
0
diff
changeset
|
120 |
3bfef07b0cd9
- cleanup of non-working java binding, restart work, somewhat different interface
cslag
parents:
0
diff
changeset
|
121 jlong JNICALL Java_org_dyncall_DC_callLong(JNIEnv *, jclass, jlong in_vm, jlong target) |
3bfef07b0cd9
- cleanup of non-working java binding, restart work, somewhat different interface
cslag
parents:
0
diff
changeset
|
122 { |
3bfef07b0cd9
- cleanup of non-working java binding, restart work, somewhat different interface
cslag
parents:
0
diff
changeset
|
123 return dcCallLong((DCCallVM*)in_vm, (DCpointer)target) |
0 | 124 } |
125 | |
18
3bfef07b0cd9
- cleanup of non-working java binding, restart work, somewhat different interface
cslag
parents:
0
diff
changeset
|
126 jlong JNICALL Java_org_dyncall_DC_callLongLong(JNIEnv *, jclass, jlong in_vm, jlong target) |
3bfef07b0cd9
- cleanup of non-working java binding, restart work, somewhat different interface
cslag
parents:
0
diff
changeset
|
127 { |
3bfef07b0cd9
- cleanup of non-working java binding, restart work, somewhat different interface
cslag
parents:
0
diff
changeset
|
128 return dcCallLongLong((DCCallVM*)in_vm, (DCpointer)target) |
3bfef07b0cd9
- cleanup of non-working java binding, restart work, somewhat different interface
cslag
parents:
0
diff
changeset
|
129 } |
3bfef07b0cd9
- cleanup of non-working java binding, restart work, somewhat different interface
cslag
parents:
0
diff
changeset
|
130 |
3bfef07b0cd9
- cleanup of non-working java binding, restart work, somewhat different interface
cslag
parents:
0
diff
changeset
|
131 jfloat JNICALL Java_org_dyncall_DC_callFloat(JNIEnv *, jclass, jlong in_vm, jlong target) |
3bfef07b0cd9
- cleanup of non-working java binding, restart work, somewhat different interface
cslag
parents:
0
diff
changeset
|
132 { |
3bfef07b0cd9
- cleanup of non-working java binding, restart work, somewhat different interface
cslag
parents:
0
diff
changeset
|
133 return dcCallFloat((DCCallVM*)in_vm, (DCpointer)target) |
3bfef07b0cd9
- cleanup of non-working java binding, restart work, somewhat different interface
cslag
parents:
0
diff
changeset
|
134 } |
3bfef07b0cd9
- cleanup of non-working java binding, restart work, somewhat different interface
cslag
parents:
0
diff
changeset
|
135 |
3bfef07b0cd9
- cleanup of non-working java binding, restart work, somewhat different interface
cslag
parents:
0
diff
changeset
|
136 jdouble JNICALL Java_org_dyncall_DC_callDouble(JNIEnv *, jclass, jlong in_vm, jlong target) |
3bfef07b0cd9
- cleanup of non-working java binding, restart work, somewhat different interface
cslag
parents:
0
diff
changeset
|
137 { |
3bfef07b0cd9
- cleanup of non-working java binding, restart work, somewhat different interface
cslag
parents:
0
diff
changeset
|
138 return dcCallDouble((DCCallVM*)in_vm, (DCpointer)target) |
3bfef07b0cd9
- cleanup of non-working java binding, restart work, somewhat different interface
cslag
parents:
0
diff
changeset
|
139 } |
0 | 140 |
18
3bfef07b0cd9
- cleanup of non-working java binding, restart work, somewhat different interface
cslag
parents:
0
diff
changeset
|
141 jlong JNICALL Java_org_dyncall_DC_callPointer(JNIEnv *, jclass, jlong in_vm, jlong target) |
3bfef07b0cd9
- cleanup of non-working java binding, restart work, somewhat different interface
cslag
parents:
0
diff
changeset
|
142 { |
3bfef07b0cd9
- cleanup of non-working java binding, restart work, somewhat different interface
cslag
parents:
0
diff
changeset
|
143 return dcCallPointer((DCCallVM*)in_vm, (DCpointer)target) |
3bfef07b0cd9
- cleanup of non-working java binding, restart work, somewhat different interface
cslag
parents:
0
diff
changeset
|
144 } |
0 | 145 |
18
3bfef07b0cd9
- cleanup of non-working java binding, restart work, somewhat different interface
cslag
parents:
0
diff
changeset
|
146 jstring JNICALL Java_org_dyncall_DC_callString(JNIEnv *, jclass, jlong in_vm, jlong target) |
3bfef07b0cd9
- cleanup of non-working java binding, restart work, somewhat different interface
cslag
parents:
0
diff
changeset
|
147 { |
3bfef07b0cd9
- cleanup of non-working java binding, restart work, somewhat different interface
cslag
parents:
0
diff
changeset
|
148 return dcCallPointer((DCCallVM*)in_vm, (DCpointer)target) |
3bfef07b0cd9
- cleanup of non-working java binding, restart work, somewhat different interface
cslag
parents:
0
diff
changeset
|
149 } |
3bfef07b0cd9
- cleanup of non-working java binding, restart work, somewhat different interface
cslag
parents:
0
diff
changeset
|
150 |
3bfef07b0cd9
- cleanup of non-working java binding, restart work, somewhat different interface
cslag
parents:
0
diff
changeset
|
151 jint JNICALL Java_org_dyncall_DC_getError(JNIEnv *, jclass, jlong in_vm) |
3bfef07b0cd9
- cleanup of non-working java binding, restart work, somewhat different interface
cslag
parents:
0
diff
changeset
|
152 { |
3bfef07b0cd9
- cleanup of non-working java binding, restart work, somewhat different interface
cslag
parents:
0
diff
changeset
|
153 return dcGetError((DCCallVM*)in_vm); |
3bfef07b0cd9
- cleanup of non-working java binding, restart work, somewhat different interface
cslag
parents:
0
diff
changeset
|
154 } |
3bfef07b0cd9
- cleanup of non-working java binding, restart work, somewhat different interface
cslag
parents:
0
diff
changeset
|
155 |