• Steeve Morin's avatar
    cmd/cgo: update JNI's jobject to uintptr check for newer Android NDKs · 5419e7a0
    Steeve Morin authored
    In Android's NDK16, jobject is now declared as:
        #ifdef __cplusplus
        class _jobject {};
        typedef _jobject*       jobject;
        #else /* not __cplusplus */
        typedef void*           jobject;
        #endif
    
    This makes the jobject to uintptr check fail because it expects the
    following definition:
        struct _jobject;
        typedef struct _jobject *jobject;
    
    Update the type check to handle that new type definition in both C and
    C++ modes.
    
    Fixes #26213
    
    Change-Id: Ic36d4a5176526998d2d5e4e404f8943961141f7a
    GitHub-Last-Rev: 42037c3c584579c2b3281c25372b830e864e7aec
    GitHub-Pull-Request: golang/go#26221
    Reviewed-on: https://go-review.googlesource.com/122217
    Run-TryBot: Ian Lance Taylor <iant@golang.org>
    TryBot-Result: Gobot Gobot <gobot@golang.org>
    Reviewed-by: 's avatarKeith Randall <khr@golang.org>
    5419e7a0
gcc.go 77.5 KB