]> gerrit.simantics Code Review - simantics/platform.git/blob - bundles/org.eclipse.swt.win32.win32.x86_64/library/swt.c
Work around SWT 4.13 - 4.18 Win32 DnD bug 567422
[simantics/platform.git] / bundles / org.eclipse.swt.win32.win32.x86_64 / library / swt.c
1 /*******************************************************************************
2  * Copyright (c) 2000, 2005 IBM Corporation and others.
3  *
4  * This program and the accompanying materials
5  * are made available under the terms of the Eclipse Public License 2.0
6  * which accompanies this distribution, and is available at
7  * https://www.eclipse.org/legal/epl-2.0/
8  *
9  * SPDX-License-Identifier: EPL-2.0
10  * 
11  * Contributors:
12  *     IBM Corporation - initial API and implementation
13  *******************************************************************************/
14  
15 #include "swt.h"
16
17 int IS_JNI_1_2 = 0;
18
19 #ifdef JNI_VERSION_1_2
20 JNIEXPORT jint JNICALL JNI_OnLoad(JavaVM *vm, void *reserved) {
21         IS_JNI_1_2 = 1;
22         return JNI_VERSION_1_2;
23 }
24 #endif
25
26 void throwOutOfMemory(JNIEnv *env) {
27         jclass clazz = (*env)->FindClass(env, "java/lang/OutOfMemoryError");
28         if (clazz != NULL) {
29                 (*env)->ThrowNew(env, clazz, "");
30         }
31 }