@@ -383,7 +383,7 @@ struct JNINativeInterface
383
383
384
384
jstring (* _Nonnull NewString)(JNIEnv * _Nonnull, const jchar * _Nonnull, jsize);
385
385
jsize (* _Nonnull GetStringLength)(JNIEnv * _Nonnull, jstring);
386
- const jchar *(* _Nonnull GetStringChars)(JNIEnv * _Nonnull, jstring, jboolean * _Nullable);
386
+ const jchar * _Nullable (* _Nonnull GetStringChars)(JNIEnv * _Nonnull, jstring, jboolean * _Nullable);
387
387
void (* _Nonnull ReleaseStringChars)(JNIEnv * _Nonnull, jstring, const jchar * _Nonnull);
388
388
jstring (* _Nonnull NewStringUTF)(JNIEnv * _Nonnull, const char * _Nonnull);
389
389
jsize (* _Nonnull GetStringUTFLength)(JNIEnv * _Nonnull, jstring);
@@ -413,14 +413,14 @@ struct JNINativeInterface
413
413
jfloat * _Nullable (* _Nonnull GetFloatArrayElements)(JNIEnv * _Nonnull, jfloatArray, jboolean * _Nonnull);
414
414
jdouble * _Nullable (* _Nonnull GetDoubleArrayElements)(JNIEnv * _Nonnull, jdoubleArray, jboolean * _Nonnull);
415
415
416
- void (* _Nonnull ReleaseBooleanArrayElements)(JNIEnv * _Nonnull, jbooleanArray, jboolean *, jint) CF_SWIFT_NAME(ReleaseArrayElements);
417
- void (* _Nonnull ReleaseByteArrayElements)(JNIEnv * _Nonnull, jbyteArray, jbyte *, jint) CF_SWIFT_NAME(ReleaseArrayElements);
418
- void (* _Nonnull ReleaseCharArrayElements)(JNIEnv * _Nonnull, jcharArray, jchar *, jint) CF_SWIFT_NAME(ReleaseArrayElements);
419
- void (* _Nonnull ReleaseShortArrayElements)(JNIEnv * _Nonnull, jshortArray, jshort *, jint) CF_SWIFT_NAME(ReleaseArrayElements);
420
- void (* _Nonnull ReleaseIntArrayElements)(JNIEnv * _Nonnull, jintArray, jint *, jint) CF_SWIFT_NAME(ReleaseArrayElements);
421
- void (* _Nonnull ReleaseLongArrayElements)(JNIEnv * _Nonnull, jlongArray, jlong *, jint) CF_SWIFT_NAME(ReleaseArrayElements);
422
- void (* _Nonnull ReleaseFloatArrayElements)(JNIEnv * _Nonnull, jfloatArray, jfloat *, jint) CF_SWIFT_NAME(ReleaseArrayElements);
423
- void (* _Nonnull ReleaseDoubleArrayElements)(JNIEnv * _Nonnull, jdoubleArray, jdouble *, jint) CF_SWIFT_NAME(ReleaseArrayElements);
416
+ void (* _Nonnull ReleaseBooleanArrayElements)(JNIEnv * _Nonnull, jbooleanArray, jboolean * _Nullable , jint) CF_SWIFT_NAME(ReleaseArrayElements);
417
+ void (* _Nonnull ReleaseByteArrayElements)(JNIEnv * _Nonnull, jbyteArray, jbyte * _Nullable , jint) CF_SWIFT_NAME(ReleaseArrayElements);
418
+ void (* _Nonnull ReleaseCharArrayElements)(JNIEnv * _Nonnull, jcharArray, jchar * _Nullable , jint) CF_SWIFT_NAME(ReleaseArrayElements);
419
+ void (* _Nonnull ReleaseShortArrayElements)(JNIEnv * _Nonnull, jshortArray, jshort * _Nullable , jint) CF_SWIFT_NAME(ReleaseArrayElements);
420
+ void (* _Nonnull ReleaseIntArrayElements)(JNIEnv * _Nonnull, jintArray, jint * _Nullable , jint) CF_SWIFT_NAME(ReleaseArrayElements);
421
+ void (* _Nonnull ReleaseLongArrayElements)(JNIEnv * _Nonnull, jlongArray, jlong * _Nullable , jint) CF_SWIFT_NAME(ReleaseArrayElements);
422
+ void (* _Nonnull ReleaseFloatArrayElements)(JNIEnv * _Nonnull, jfloatArray, jfloat * _Nullable , jint) CF_SWIFT_NAME(ReleaseArrayElements);
423
+ void (* _Nonnull ReleaseDoubleArrayElements)(JNIEnv * _Nonnull, jdoubleArray, jdouble * _Nullable , jint) CF_SWIFT_NAME(ReleaseArrayElements);
424
424
425
425
void (* _Nonnull GetBooleanArrayRegion)(JNIEnv * _Nonnull, jbooleanArray, jsize, jsize, jboolean * _Nonnull);
426
426
void (* _Nonnull GetByteArrayRegion)(JNIEnv * _Nonnull, jbyteArray, jsize, jsize, jbyte * _Nonnull);
@@ -441,7 +441,7 @@ struct JNINativeInterface
441
441
void (* _Nonnull SetFloatArrayRegion)(JNIEnv * _Nonnull, jfloatArray, jsize, jsize, const jfloat * _Nonnull) CF_SWIFT_NAME(SetArrayRegion);
442
442
void (* _Nonnull SetDoubleArrayRegion)(JNIEnv * _Nonnull, jdoubleArray, jsize, jsize, const jdouble * _Nonnull) CF_SWIFT_NAME(SetArrayRegion);
443
443
444
- jint (* _Nonnull RegisterNatives)(JNIEnv * _Nonnull, jclass, const JNINativeMethod *, jint);
444
+ jint (* _Nonnull RegisterNatives)(JNIEnv * _Nonnull, jclass, const JNINativeMethod * _Nonnull , jint);
445
445
jint (* _Nonnull UnregisterNatives)(JNIEnv * _Nonnull, jclass);
446
446
jint (* _Nonnull MonitorEnter)(JNIEnv * _Nonnull, jobject);
447
447
jint (* _Nonnull MonitorExit)(JNIEnv * _Nonnull, jobject);
@@ -450,11 +450,11 @@ struct JNINativeInterface
450
450
void (* _Nonnull GetStringRegion)(JNIEnv * _Nonnull, jstring, jsize, jsize, jchar * _Nonnull);
451
451
void (* _Nonnull GetStringUTFRegion)(JNIEnv * _Nonnull, jstring, jsize, jsize, char * _Nonnull);
452
452
453
- void *(* _Nonnull GetPrimitiveArrayCritical)(JNIEnv * _Nonnull, jarray, jboolean * _Nonnull);
454
- void (* _Nonnull ReleasePrimitiveArrayCritical)(JNIEnv * _Nonnull, jarray, void *, jint);
453
+ void * _Nullable (* _Nonnull GetPrimitiveArrayCritical)(JNIEnv * _Nonnull, jarray, jboolean * _Nonnull);
454
+ void (* _Nonnull ReleasePrimitiveArrayCritical)(JNIEnv * _Nonnull, jarray, void * _Nullable , jint);
455
455
456
- const jchar *(* _Nonnull GetStringCritical)(JNIEnv * _Nonnull, jstring, jboolean * _Nonnull);
457
- void (* _Nonnull ReleaseStringCritical)(JNIEnv * _Nonnull, jstring, const jchar * _Nonnull );
456
+ const jchar * _Nullable (* _Nonnull GetStringCritical)(JNIEnv * _Nonnull, jstring, jboolean * _Nonnull);
457
+ void (* _Nonnull ReleaseStringCritical)(JNIEnv * _Nonnull, jstring, const jchar * _Nullable );
458
458
459
459
jweak (* _Nonnull NewWeakGlobalRef)(JNIEnv * _Nonnull, jobject);
460
460
void (* _Nonnull DeleteWeakGlobalRef)(JNIEnv * _Nonnull, jweak);
@@ -1332,23 +1332,23 @@ struct _JNIEnv
1332
1332
*/
1333
1333
struct JNIInvokeInterface
1334
1334
{
1335
- void *reserved0;
1336
- void *reserved1;
1337
- void *reserved2;
1335
+ void * _Null_unspecified reserved0;
1336
+ void * _Null_unspecified reserved1;
1337
+ void * _Null_unspecified reserved2;
1338
1338
1339
1339
jint (* _Nonnull DestroyJavaVM)(JavaVM * _Nonnull);
1340
- jint (* _Nonnull AttachCurrentThread)(JavaVM *, JNIEnv ** , void * _Nullable);
1340
+ jint (* _Nonnull AttachCurrentThread)(JavaVM * _Nonnull , JNIEnv * _Nullable * _Nullable , void * _Nullable);
1341
1341
jint (* _Nonnull DetachCurrentThread)(JavaVM * _Nonnull);
1342
- jint (* _Nonnull GetEnv)(JavaVM *, void ** , jint);
1343
- jint (* _Nonnull AttachCurrentThreadAsDaemon)(JavaVM *, JNIEnv ** , void * _Nonnull );
1342
+ jint (* _Nonnull GetEnv)(JavaVM * _Nonnull , void * _Nullable * _Nullable , jint);
1343
+ jint (* _Nonnull AttachCurrentThreadAsDaemon)(JavaVM * _Nonnull , JNIEnv * _Nullable * _Nullable , void * _Nullable );
1344
1344
};
1345
1345
1346
1346
/*
1347
1347
* C++ version.
1348
1348
*/
1349
1349
struct _JavaVM
1350
1350
{
1351
- const struct JNIInvokeInterface *functions;
1351
+ const struct JNIInvokeInterface * _Nonnull functions;
1352
1352
1353
1353
#if defined(__cplusplus)
1354
1354
jint DestroyJavaVM ()
@@ -1376,9 +1376,9 @@ struct _JavaVM
1376
1376
1377
1377
struct JavaVMAttachArgs
1378
1378
{
1379
- jint version; /* must be >= JNI_VERSION_1_2 */
1380
- const char *name; /* NULL or name of thread as modified UTF-8 str */
1381
- jobject group; /* global ref of a ThreadGroup object, or NULL */
1379
+ jint version; /* * must be >= JNI_VERSION_1_2 */
1380
+ const char * _Nullable name; /* * NULL or name of thread as modified UTF-8 str */
1381
+ jobject group; /* * global ref of a ThreadGroup object, or NULL */
1382
1382
};
1383
1383
typedef struct JavaVMAttachArgs JavaVMAttachArgs;
1384
1384
@@ -1388,16 +1388,16 @@ typedef struct JavaVMAttachArgs JavaVMAttachArgs;
1388
1388
*/
1389
1389
typedef struct JavaVMOption
1390
1390
{
1391
- const char *optionString;
1392
- void *extraInfo;
1391
+ const char * _Nullable optionString;
1392
+ void * _Nullable extraInfo;
1393
1393
} JavaVMOption;
1394
1394
1395
1395
typedef struct JavaVMInitArgs
1396
1396
{
1397
1397
jint version; /* use JNI_VERSION_1_2 or later */
1398
1398
1399
1399
jint nOptions;
1400
- JavaVMOption *options;
1400
+ JavaVMOption * _Nonnull options;
1401
1401
jboolean ignoreUnrecognized;
1402
1402
} JavaVMInitArgs;
1403
1403
@@ -1423,8 +1423,8 @@ jint JNI_GetCreatedJavaVMs(JavaVM**, jsize, jsize* _Nonnull);
1423
1423
* Prototypes for functions exported by loadable shared libs. These are
1424
1424
* called by JNI, not provided by JNI.
1425
1425
*/
1426
- JNIEXPORT jint JNICALL JNI_OnLoad (JavaVM *vm, void *reserved);
1427
- JNIEXPORT void JNICALL JNI_OnUnload (JavaVM *vm, void *reserved);
1426
+ JNIEXPORT jint JNICALL JNI_OnLoad (JavaVM * _Nonnull vm, void * _Null_unspecified reserved);
1427
+ JNIEXPORT void JNICALL JNI_OnUnload (JavaVM * _Nonnull vm, void * _Null_unspecified reserved);
1428
1428
1429
1429
#ifdef __cplusplus
1430
1430
}
0 commit comments