Mercurial > pub > dyncall > bindings
comparison java/jdc/src/org_dyncall_DC.c @ 0:0cfcc391201f
initial from svn dyncall-1745
author | Daniel Adler |
---|---|
date | Thu, 19 Mar 2015 22:26:28 +0100 |
parents | |
children | 3bfef07b0cd9 |
comparison
equal
deleted
inserted
replaced
-1:000000000000 | 0:0cfcc391201f |
---|---|
1 #include "org_dyncall_DC.h" | |
2 #include "../../../../dyncall/dyncall.h" | |
3 jlong JNICALL Java_org_dyncall_DC_newCallVM | |
4 (JNIEnv *pEnv, jclass clazz, jint mode, jint size) | |
5 { | |
6 return (jlong) dcNewCallVM(mode,size); | |
7 } | |
8 | |
9 void JNICALL Java_org_dyncall_DC_reset (JNIEnv *, jclass, jlong vm) | |
10 { | |
11 DCCallVM* vm = (DCCallVM*) in_vm; | |
12 dcReset(vm); | |
13 } | |
14 | |
15 void JNICALL Java_org_dyncall_DC_argBool(JNIEnv *, jclass, jlong vm, jboolean b) | |
16 { | |
17 DCCallVM* vm = (DCCallVM*) in_vm; | |
18 dcPushBool(vm,b); | |
19 } | |
20 | |
21 void JNICALL Java_org_dyncall_DC_argByte (JNIEnv *, jclass, jlong in_vm, jbyte b) | |
22 { | |
23 DCCallVM* vm = (DCCallVM*) in_vm; | |
24 dcPushChar(vm,b); | |
25 } | |
26 void JNICALL Java_org_dyncall_DC_argShort(JNIEnv *, jclass, jlong in_vm, jshort s) | |
27 { | |
28 DCCallVM* vm = (DCCallVM*) in_vm; | |
29 dcPushShort(vm,s); | |
30 } | |
31 | |
32 void JNICALL Java_org_dyncall_DC_argInt(JNIEnv *, jclass, jlong in_vm, jint i) | |
33 { | |
34 DCCallVM* vm = (DCCallVM*) in_vm; | |
35 dcPushInt(vm,i); | |
36 | |
37 } | |
38 void JNICALL Java_org_dyncall_DC_argLong (JNIEnv *, jclass, jlong in_vm, jlong l) | |
39 { | |
40 DCCallVM* vm = (DCCallVM*) in_vm; | |
41 dcPushLong(vm,l); | |
42 } | |
43 | |
44 void JNICALL Java_org_dyncall_DC_argChar(JNIEnv *, jclass, jlong in_vm, jchar c) | |
45 { | |
46 DCCallVM* vm = (DCCallVM*) in_vm; | |
47 dcPushChar(vm,c); | |
48 } | |
49 | |
50 void JNICALL Java_org_dyncall_DC_argFloat(JNIEnv *, jclass, jlong in_vm, jfloat f) | |
51 { | |
52 DCCallVM* vm = (DCCallVM*) in_vm; | |
53 dcPushFloat(vm,f); | |
54 } | |
55 | |
56 void JNICALL Java_org_dyncall_DC_argDouble(JNIEnv *, jclass, jlong in_vm, jdouble d) | |
57 { | |
58 DCCallVM* vm = (DCCallVM*) in_vm; | |
59 dcPushDouble(vm,d); | |
60 } | |
61 | |
62 void JNICALL Java_org_dyncall_DC_argPointer__JJ(JNIEnv *, jclass, jlong in_vm, jlong l) | |
63 { | |
64 DCCallVM* vm = (DCCallVM*) in_vm; | |
65 dcPushPointer(vm, (DCpointer) l ); | |
66 } | |
67 | |
68 void JNICALL Java_org_dyncall_DC_argPointer__JLjava_lang_Object_2(JNIEnv *, jclass, jlong in_vm, jobject o) | |
69 { | |
70 DCCallVM* vm = (DCCallVM*) in_vm; | |
71 dcPushPointer(vm, (DCpointer) o ); | |
72 } | |
73 | |
74 void JNICALL Java_org_dyncall_DC_argString(JNIEnv *, jclass, jlong, jstring) | |
75 { | |
76 DCCallVM* vm = (DCCallVM*) in_vm; | |
77 dcPushPointer(vm, (DCpointer) o ); | |
78 } | |
79 | |
80 void JNICALL Java_org_dyncall_DC_callVoid (JNIEnv *, jclass, jlong in_vm, jlong in_target) | |
81 { | |
82 DCCallVM* vm = (DCCallVM*) in_vm; | |
83 dcCallVoid(vm, (DCpointer) target) | |
84 } | |
85 | |
86 /* | |
87 * Class: org_dyncall_DC | |
88 * Method: callBoolean | |
89 * Signature: (JJ)Z | |
90 */ | |
91 jboolean JNICALL Java_org_dyncall_DC_callBoolean(JNIEnv *, jclass, jlong in_vm, jlong target) | |
92 { | |
93 DCCallVM* vm = (DCCallVM*) in_vm; | |
94 dcCallBoolean(vm, (DCpointer) target) | |
95 } | |
96 | |
97 /* | |
98 * Class: org_dyncall_DC | |
99 * Method: callInt | |
100 * Signature: (JJ)I | |
101 */ | |
102 JNIEXPORT jint JNICALL Java_org_dyncall_DC_callInt | |
103 (JNIEnv *, jclass, jlong, jlong); | |
104 | |
105 /* | |
106 * Class: org_dyncall_DC | |
107 * Method: callLong | |
108 * Signature: (JJ)J | |
109 */ | |
110 JNIEXPORT jlong JNICALL Java_org_dyncall_DC_callLong | |
111 (JNIEnv *, jclass, jlong, jlong); | |
112 |