annotate java/jdc/src/org_dyncall_DC.c @ 17:739c40f35a6a

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