This is an automated email from the ASF dual-hosted git repository.

markt pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/tomcat-native.git


The following commit(s) were added to refs/heads/main by this push:
     new eedbeb023 Fix compilation error on Windows
eedbeb023 is described below

commit eedbeb023a424336668ece25fdb57134e39100f3
Author: Mark Thomas <ma...@apache.org>
AuthorDate: Wed Jul 17 19:19:04 2024 +0100

    Fix compilation error on Windows
---
 native/src/jnilib.c | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/native/src/jnilib.c b/native/src/jnilib.c
index 836502c52..28666187c 100644
--- a/native/src/jnilib.c
+++ b/native/src/jnilib.c
@@ -133,10 +133,12 @@ jstring tcn_new_stringn(JNIEnv *env, const char *str, 
size_t l)
 
 jbyteArray tcn_new_arrayb(JNIEnv *env, const unsigned char *data, size_t len)
 {
+    jbyteArray bytes = 0;
+    
     if ((*env)->EnsureLocalCapacity(env, 1) < 0) {
         return NULL; /* out of memory error */
     }
-    jbyteArray bytes = (*env)->NewByteArray(env, (jsize)len);
+    bytes = (*env)->NewByteArray(env, (jsize)len);
     if (bytes != NULL) {
         (*env)->SetByteArrayRegion(env, bytes, 0, (jint)len, (jbyte *)data);
     }


---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org
For additional commands, e-mail: dev-h...@tomcat.apache.org

Reply via email to