google / google/j2objc

jni.h can't be included by C/C++ libraries

Open
#2,503 1 comment 0 reactions 0 assignees View on GitHub
Dominant language
Java
Stars
6k
Forks
999
Avg merge
19h 20m
Merged PRs (30d)
14

Description

Hello,

I noticed that in a recent commit, support for JNI .cc files—originally intended to be shared between Android and iOS was removed. Specifically, the following section in `J2ObjC_types.h` was deleted:
```
#if defined(__OBJC__) || defined(__cplusplus__)
typedef bool jboolean;
#else
typedef uint8_t jboolean;
#endif
...
typedef _Atomic(jboolean) volatile_jboolean;
```

From my understanding, the project is expected to maintain backward compatibility with native code used in other projects. Could you please clarify whether this removal was intentional, and if so, what the recommended approach is for maintaining cross-platform JNI compatibility going forward?

Thank you.

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.