summaryrefslogtreecommitdiff
path: root/test/native/lib/PrimlibInterface.c
blob: 47918470a87ea253b7eb9e8ca63e6fa5060340e6 (plain)
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
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
#include "PrimlibInterface.h"
#include <primlib.h>

/*
 * Class:     PrimlibInterface
 * Method:    unwrapBoolean
 * Signature: (Ljava/lang/Object;)Z
 */
JNIEXPORT jboolean JNICALL Java_PrimlibInterface_unwrapBoolean
(JNIEnv * env, jclass thisClass, jobject o) {
	return PRIMLIB_UnwrapBoolean(env, o);
}

/*
 * Class:     PrimlibInterface
 * Method:    unwrapByte
 * Signature: (Ljava/lang/Object;)B
 */
JNIEXPORT jbyte JNICALL Java_PrimlibInterface_unwrapByte
  (JNIEnv * env, jclass thisClass, jobject o) {
	return PRIMLIB_UnwrapByte(env, o);
}

/*
 * Class:     PrimlibInterface
 * Method:    unwrapShort
 * Signature: (Ljava/lang/Object;)S
 */
JNIEXPORT jshort JNICALL Java_PrimlibInterface_unwrapShort
  (JNIEnv * env, jclass thisClass, jobject o) {
	return PRIMLIB_UnwrapShort(env, o);
}

/*
 * Class:     PrimlibInterface
 * Method:    unwrapChar
 * Signature: (Ljava/lang/Object;)C
 */
JNIEXPORT jchar JNICALL Java_PrimlibInterface_unwrapChar
  (JNIEnv * env, jclass thisClass, jobject o) {
	return PRIMLIB_UnwrapChar(env, o);
}

/*
 * Class:     PrimlibInterface
 * Method:    unwrapInt
 * Signature: (Ljava/lang/Object;)I
 */
JNIEXPORT jint JNICALL Java_PrimlibInterface_unwrapInt
  (JNIEnv * env, jclass thisClass, jobject o) {
	return PRIMLIB_UnwrapInt(env, o);
}

/*
 * Class:     PrimlibInterface
 * Method:    unwrapLong
 * Signature: (Ljava/lang/Object;)J
 */
JNIEXPORT jlong JNICALL Java_PrimlibInterface_unwrapLong
  (JNIEnv * env, jclass thisClass, jobject o) {
	return PRIMLIB_UnwrapLong(env, o);
}

/*
 * Class:     PrimlibInterface
 * Method:    unwrapFloat
 * Signature: (Ljava/lang/Object;)F
 */
JNIEXPORT jfloat JNICALL Java_PrimlibInterface_unwrapFloat
  (JNIEnv * env, jclass thisClass, jobject o) {
	return PRIMLIB_UnwrapFloat(env, o);
}

/*
 * Class:     PrimlibInterface
 * Method:    unwrapDouble
 * Signature: (Ljava/lang/Object;)D
 */
JNIEXPORT jdouble JNICALL Java_PrimlibInterface_unwrapDouble
  (JNIEnv * env, jclass thisClass, jobject o) {
	return PRIMLIB_UnwrapDouble(env, o);
}

/*
 * Class:     PrimlibInterface
 * Method:    wrapBoolean
 * Signature: (Z)Ljava/lang/Boolean;
 */
JNIEXPORT jobject JNICALL Java_PrimlibInterface_wrapBoolean
(JNIEnv * env, jclass thisClass, jboolean val) {
	return PRIMLIB_WrapBoolean(env, val);
}

/*
 * Class:     PrimlibInterface
 * Method:    wrapByte
 * Signature: (B)Ljava/lang/Byte;
 */
JNIEXPORT jobject JNICALL Java_PrimlibInterface_wrapByte
(JNIEnv * env, jclass thisClass, jbyte val) {
	return PRIMLIB_WrapByte(env, val);
}

/*
 * Class:     PrimlibInterface
 * Method:    wrapShort
 * Signature: (S)Ljava/lang/Short;
 */
JNIEXPORT jobject JNICALL Java_PrimlibInterface_wrapShort
(JNIEnv * env, jclass thisClass, jshort val) {
	return PRIMLIB_WrapShort(env, val);
}

/*
 * Class:     PrimlibInterface
 * Method:    wrapChar
 * Signature: (C)Ljava/lang/Character;
 */
JNIEXPORT jobject JNICALL Java_PrimlibInterface_wrapChar
(JNIEnv * env, jclass thisClass, jchar val) {
	return PRIMLIB_WrapChar(env, val);
}

/*
 * Class:     PrimlibInterface
 * Method:    wrapInt
 * Signature: (I)Ljava/lang/Integer;
 */
JNIEXPORT jobject JNICALL Java_PrimlibInterface_wrapInt
(JNIEnv * env, jclass thisClass, jint val) {
	return PRIMLIB_WrapInt(env, val);
}

/*
 * Class:     PrimlibInterface
 * Method:    wrapLong
 * Signature: (J)Ljava/lang/Long;
 */
JNIEXPORT jobject JNICALL Java_PrimlibInterface_wrapLong
(JNIEnv * env, jclass thisClass, jlong val) {
	return PRIMLIB_WrapLong(env, val);
}

/*
 * Class:     PrimlibInterface
 * Method:    wrapFloat
 * Signature: (F)Ljava/lang/Float;
 */
JNIEXPORT jobject JNICALL Java_PrimlibInterface_wrapFloat
(JNIEnv * env, jclass thisClass, jfloat val) {
	return PRIMLIB_WrapFloat(env, val);
}

/*
 * Class:     PrimlibInterface
 * Method:    wrapDouble
 * Signature: (D)Ljava/lang/Double;
 */
JNIEXPORT jobject JNICALL Java_PrimlibInterface_wrapDouble
(JNIEnv * env, jclass thisClass, jdouble val) {
	return PRIMLIB_WrapDouble(env, val);
}