Ignore:
Timestamp:
Sep 23, 2014 4:13:40 AM (10 years ago)
Author:
ming
Message:

Fixed #1792: Create generic JNI OnLoad? function

File:
1 edited

Legend:

Unmodified
Added
Removed
  • pjproject/trunk/pjlib/src/pj/os_core_unix.c

    r4728 r4927  
    4949#define SIGNATURE1  0xDEAFBEEF 
    5050#define SIGNATURE2  0xDEADC0DE 
     51 
     52#ifndef PJ_JNI_HAS_JNI_ONLOAD 
     53#  define PJ_JNI_HAS_JNI_ONLOAD    PJ_ANDROID 
     54#endif 
     55 
     56#if defined(PJ_JNI_HAS_JNI_ONLOAD) && PJ_JNI_HAS_JNI_ONLOAD != 0 
     57 
     58#include <jni.h> 
     59 
     60JavaVM *pj_jni_jvm = NULL; 
     61 
     62JNIEXPORT jint JNI_OnLoad(JavaVM *vm, void *reserved) 
     63{ 
     64    pj_jni_jvm = vm; 
     65     
     66    return JNI_VERSION_1_4; 
     67} 
     68#endif 
    5169 
    5270struct pj_thread_t 
Note: See TracChangeset for help on using the changeset viewer.