2
* File: sidl_InvariantViolation_jniStub.c
3
* Symbol: sidl.InvariantViolation-v0.9.1
5
* Babel Version: 0.10.2
7
* Revision: @(#) $Id: $
8
* Description: Client-side JNI glue code for sidl.InvariantViolation
10
* Copyright (c) 2000-2002, The Regents of the University of California.
11
* Produced at the Lawrence Livermore National Laboratory.
12
* Written by the Components Team <components@llnl.gov>
13
* All rights reserved.
15
* This file is part of Babel. For more information, see
16
* http://www.llnl.gov/CASC/components/. Please read the COPYRIGHT file
17
* for Our Notice and the LICENSE file for the GNU Lesser General Public
20
* This program is free software; you can redistribute it and/or modify it
21
* under the terms of the GNU Lesser General Public License (as published by
22
* the Free Software Foundation) version 2.1 dated February 1999.
24
* This program is distributed in the hope that it will be useful, but
25
* WITHOUT ANY WARRANTY; without even the IMPLIED WARRANTY OF
26
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the terms and
27
* conditions of the GNU Lesser General Public License for more details.
29
* You should have recieved a copy of the GNU Lesser General Public License
30
* along with this program; if not, write to the Free Software Foundation,
31
* Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
33
* WARNING: Automatically generated; changes will be lost
35
* babel-version = 0.10.2
38
#include "sidl_Java.h"
39
#include "sidl_Loader.h"
40
#include "sidl_String.h"
41
#include "sidl_InvariantViolation_IOR.h"
42
#include "babel_config.h"
45
* Convert between jlong and void* pointers.
48
#if (SIZEOF_VOID_P == 8)
49
#define JLONG_TO_POINTER(x) ((void*)(x))
50
#define POINTER_TO_JLONG(x) ((jlong)(x))
52
#define JLONG_TO_POINTER(x) ((void*)(int32_t)(x))
53
#define POINTER_TO_JLONG(x) ((jlong)(int32_t)(x))
61
* External reference to IOR methods.
64
static const struct sidl_InvariantViolation__external* s_external = NULL;
67
* Create object instance and return reference.
70
static jlong jni__create_ior(
76
return POINTER_TO_JLONG((*s_external->createObject)());
80
* Register JNI methods with the Java JVM.
83
void sidl_InvariantViolation__register(JNIEnv* env)
85
JNINativeMethod methods[1];
88
s_external = sidl_InvariantViolation__externals();
89
methods[0].name = "_create_ior";
90
methods[0].signature = "()J";
91
methods[0].fnPtr = (void *)jni__create_ior;
94
cls = (*env)->FindClass(env, "sidl/InvariantViolation");
96
(*env)->RegisterNatives(env, cls, methods, 1);
97
(*env)->DeleteLocalRef(env, cls);