Skip to content

Commit

Permalink
replace unsigned int by char16_t
Browse files Browse the repository at this point in the history
  • Loading branch information
Clement-Devevey authored Jan 20, 2025
1 parent d98bbdf commit d9fdca1
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/main/java/org/bytedeco/javacpp/tools/Generator.java
Original file line number Diff line number Diff line change
Expand Up @@ -1031,14 +1031,14 @@ boolean classes(boolean handleExceptions, boolean defineAdapters, boolean conver
out.println(" return JavaCPP_createStringFromBytes(env, ptr, std::char_traits<char>::length(ptr));");
out.println("}");
out.println();
out.println("static JavaCPP_noinline jstring JavaCPP_createStringFromUTF16(JNIEnv* env, const unsigned short* ptr, size_t length) {");
out.println("static JavaCPP_noinline jstring JavaCPP_createStringFromUTF16(JNIEnv* env, const char16_t* ptr, size_t length) {");
out.println(" if (ptr == NULL) {");
out.println(" return NULL;");
out.println(" }");
out.println(" return env->NewString(ptr, length);");
out.println("}");
out.println();
out.println("static JavaCPP_noinline jstring JavaCPP_createStringFromUTF16(JNIEnv* env, const unsigned short* ptr) {");
out.println("static JavaCPP_noinline jstring JavaCPP_createStringFromUTF16(JNIEnv* env, const char16_t* ptr) {");
out.println(" if (ptr == NULL) {");
out.println(" return NULL;");
out.println(" }");
Expand Down

0 comments on commit d9fdca1

Please sign in to comment.