comparison java/jdc/org_dyncall_DC.c @ 19:5b51738793c6

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