#include <stdint.h>
#include <inttypes.h>
#include <stddef.h>
+#include <assert.h>
// library header file's path
#include "orte_all.h"
* Signature: (Ljava/nio/ByteBuffer;)V
*/
JNIEXPORT void JNICALL Java_org_ocera_orte_types_RecvInfo_c_1helper
- (JNIEnv *env, jobject obj, jobject b_buffer) {
+ (JNIEnv *env, jclass cls, jobject b_buffer) {
+
+ _Static_assert(sizeof(char*) == 1 || \
+ sizeof(char*) == 2 || \
+ sizeof(char*) == 4 || \
+ sizeof(char*) == 8, \
+ "char* has incompatible size");
+ _Static_assert(sizeof(ORTERecvStatus) == 1 || \
+ sizeof(ORTERecvStatus) == 2 || \
+ sizeof(ORTERecvStatus) == 4 || \
+ sizeof(ORTERecvStatus) == 8, \
+ "ORTERecvStatus has incompatible size");
int32_t* buffer = (*env)->GetDirectBufferAddress(env, b_buffer);
* Signature: (J)Ljava/lang/String;
*/
JNIEXPORT jstring JNICALL Java_org_ocera_orte_types_RecvInfo_get_1string
- (JNIEnv *env, jobject obj, jlong string_ptr) {
+ (JNIEnv *env, jclass cls, jlong string_ptr) {
return (*env)->NewStringUTF(env, (char*) string_ptr);
}