[kaffe] CVS kaffe (guilhem): Fixlets for Xlib-awt.

Kaffe CVS cvs-commits at kaffe.org
Sat Jul 23 06:54:41 PDT 2005


PatchSet 6761 
Date: 2005/07/23 13:49:30
Author: guilhem
Branch: HEAD
Tag: (none) 
Log:
Fixlets for Xlib-awt.

        * libraries/clib/awt/X/img.c
        (Java_java_awt_Toolkit_imgCreateImageFromFile,
        Java_java_awt_Toolkit_imgCreateFromData): Return NULL if the image
        has not been created.

* Removed duplicated changelog entry.

Members: 
	ChangeLog:1.4286->1.4287 
	libraries/clib/awt/X/img.c:1.27->1.28 

Index: kaffe/ChangeLog
diff -u kaffe/ChangeLog:1.4286 kaffe/ChangeLog:1.4287
--- kaffe/ChangeLog:1.4286	Sat Jul 23 13:25:43 2005
+++ kaffe/ChangeLog	Sat Jul 23 13:49:30 2005
@@ -1,5 +1,12 @@
 2005-07-23  Guilhem Lavaux  <guilhem at kaffe.org>
 
+	* libraries/clib/awt/X/img.c
+	(Java_java_awt_Toolkit_imgCreateImageFromFile,
+	Java_java_awt_Toolkit_imgCreateFromData): Return NULL if the image
+	has not been created.
+
+2005-07-23  Guilhem Lavaux  <guilhem at kaffe.org>
+
 	* configure.ac: Swapped some commands for semaphore detection.
 
 	* m4/solarispthread.m4: Add semaphore library to PTHREAD_LIBS.
@@ -8,15 +15,6 @@
 	
 	* configure: Regenerated.
 	
-2005-07-22  Guilhem Lavaux  <guilhem at kaffe.org>
-
-	* m4/solaris_pthread.m4: Push the detected library into
-	THREADLIBS.
-
-	* configure.ac: Detect the library needed for semaphores before
-	checking semaphores themselves.
-	
-	* configure: Regenerated.
 2005-07-22  Guilhem Lavaux  <guilhem at kaffe.org>
 
 	* libraries/clib/awt/X/gra.c,
Index: kaffe/libraries/clib/awt/X/img.c
diff -u kaffe/libraries/clib/awt/X/img.c:1.27 kaffe/libraries/clib/awt/X/img.c:1.28
--- kaffe/libraries/clib/awt/X/img.c:1.27	Thu Jul 21 17:30:36 2005
+++ kaffe/libraries/clib/awt/X/img.c	Sat Jul 23 13:49:33 2005
@@ -719,16 +719,18 @@
 	  }
 	}
 	AWT_CLOSE( infile);
+        return JCL_NewRawDataObject(env, img);
   }
 
-  return JCL_NewRawDataObject(env, img);
+  return NULL;
 }
 
 jobject
 Java_java_awt_Toolkit_imgCreateFromData ( JNIEnv* env, jclass clazz,
 					  jbyteArray jbuffer, jint off, jint len )
 {
-  Image *img = 0;
+  Image *img = NULL;
+  jobject nimg = NULL;
   jboolean isCopy;
   jint   length = (*env)->GetArrayLength( env, jbuffer);
   jbyte  *jb = (*env)->GetByteArrayElements( env, jbuffer, &isCopy);
@@ -749,10 +751,12 @@
 	default:
 	  img = unknownImage;
 	}
+     
+     nimg = JCL_NewRawDataObject(env, img);
   }
 
   (*env)->ReleaseByteArrayElements( env, jbuffer, jb, JNI_ABORT);
-  return JCL_NewRawDataObject(env, img);
+  return nimg;
 }
 
 jobject




More information about the kaffe mailing list