On Tue, Oct 29, 2002 at 07:11:56PM -0800, David O'Brien wrote: > On Tue, Oct 29, 2002 at 07:09:41PM -0700, Chad David wrote: > > Does anybody know if there is a good reason why libobjc is built with > > thr-single.c? As well, who is the current maintainer of Objective-C? > > Few of us have ObjC clue. Do you have a patch that makes things better > that you can explain to us?
To start with I have a few changes to hash.h, objc-list.h and thr.h that allow my code to even compile (without warnings) with I have attached. I believe they are all pretty obvious, except for the change to compare_ptrs(), which I'm not totally sure about... I have additional updates to the threading, but I'm not quite finished going through it all yet. -- Chad David [EMAIL PROTECTED] www.FreeBSD.org [EMAIL PROTECTED] ISSci Inc. Calgary, Alberta Canada
diff -ud ./hash.h /usr/include/objc/hash.h --- ./hash.h Thu May 9 16:50:04 2002 +++ /usr/include/objc/hash.h Wed Oct 23 17:13:23 2002 @@ -174,8 +174,8 @@ unsigned int ctr = 0; - while (*(char*)key) { - ret ^= *(char*)key++ << ctr; + while (*(const char*)key) { + ret ^= *((const char*)key)++ << ctr; ctr = (ctr + 1) % sizeof (void *); } @@ -187,7 +187,7 @@ static inline int compare_ptrs (const void *k1, const void *k2) { - return !(k1 - k2); + return (k1 == k2); } diff -ud ./objc-list.h /usr/include/objc/objc-list.h --- ./objc-list.h Wed Mar 29 20:23:36 2000 +++ /usr/include/objc/objc-list.h Wed Oct 23 17:14:21 2002 @@ -64,9 +64,9 @@ larger than the list length, NULL is returned */ static inline void* -list_nth(int index, struct objc_list* list) +list_nth(int indx, struct objc_list* list) { - while(index-- != 0) + while(indx-- != 0) { if(list->tail) list = list->tail; diff -ud ./thr.h /usr/include/objc/thr.h --- ./thr.h Thu May 9 16:50:04 2002 +++ /usr/include/objc/thr.h Wed Oct 23 17:13:47 2002 @@ -111,7 +111,7 @@ it can be informed; for example, the GNUstep Base Library sets it so it can implement the NSBecomingMultiThreaded notification. */ -typedef void (*objc_thread_callback)(); +typedef void (*objc_thread_callback)(void); objc_thread_callback objc_set_thread_callback(objc_thread_callback func); /* Backend initialization functions */