Date: Tue, 29 Oct 2002 21:02:16 -0700 From: Chad David <davidc@issci.ca> To: freebsd-current@freebsd.org Subject: Re: Objective-C threads Message-ID: <20021029210216.A45337@newton.issci.ca> In-Reply-To: <20021030031156.GA76120@dragon.nuxi.com>; from obrien@freebsd.org on Tue, Oct 29, 2002 at 07:11:56PM -0800 References: <20021029190941.A43525@newton.issci.ca> <20021030031156.GA76120@dragon.nuxi.com>
next in thread | previous in thread | raw e-mail | index | archive | help
--ZPt4rx8FFjLCG7dd Content-Type: text/plain; charset=us-ascii Content-Disposition: inline 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 davidc@issci.ca www.FreeBSD.org davidc@freebsd.org ISSci Inc. Calgary, Alberta Canada --ZPt4rx8FFjLCG7dd Content-Type: text/plain; charset=us-ascii Content-Disposition: attachment; filename="objc.patch" 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 */ --ZPt4rx8FFjLCG7dd-- To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-current" in the body of the message
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20021029210216.A45337>