Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -117,7 +117,7 @@ void EnumGenerator::GenerateHeader(io::Printer* printer) {
"\n// Java enum ordinal preprocessor name that allows for stricter enum "
"types\n"
"// outside transpiled code.\n"
"#if J2OBJC_IMPORTED_BY_JAVA_IMPLEMENTATION\n"
"#if defined(J2OBJC_IMPORTED_BY_JAVA_IMPLEMENTATION) && J2OBJC_IMPORTED_BY_JAVA_IMPLEMENTATION\n"
"#define $ordinalpreprocessorname$ jint\n"
"#else\n"
"#define $ordinalpreprocessorname$ $ordinalenumname$\n"
Expand Down Expand Up @@ -149,7 +149,7 @@ void EnumGenerator::GenerateHeader(io::Printer* printer) {
"\n// Java enum value preprocessor name that allows for stricter enum "
"types\n"
"// outside transpiled code.\n"
"#if J2OBJC_IMPORTED_BY_JAVA_IMPLEMENTATION\n"
"#if defined(J2OBJC_IMPORTED_BY_JAVA_IMPLEMENTATION) && J2OBJC_IMPORTED_BY_JAVA_IMPLEMENTATION\n"
"#define $valuepreprocessorname$ jint\n"
"#else\n"
"#define $valuepreprocessorname$ $valueenumname$\n"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -239,7 +239,7 @@ private void printNativeEnum() {
// Use different types for transpiled Java ordinals (which expects ordinals to be int32_t) and
// native code using the enum (where stricter ordinal types help clang warnings).
printf(
"#if J2OBJC_IMPORTED_BY_JAVA_IMPLEMENTATION\n"
"#if defined(J2OBJC_IMPORTED_BY_JAVA_IMPLEMENTATION) && J2OBJC_IMPORTED_BY_JAVA_IMPLEMENTATION\n"
+ "#define %s int32_t\n"
+ "#else\n"
+ "#define %s %s\n"
Expand Down