bug-gnustep
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [RFC/base] Minor GSObjCRuntime usage cleanups


From: Richard Frith-Macdonald
Subject: Re: [RFC/base] Minor GSObjCRuntime usage cleanups
Date: Wed, 30 Jul 2003 09:30:07 +0100


On Tuesday, July 29, 2003, at 12:28 PM, David Ayers wrote:
I take it, your currently still working on the NSSocket issues of gdnc/NSDistributedNotificationCenter.

Yes ... still thinking about it. Alexander was also looking at doing a patch to make distributed notifications use unix domain socketss by default ... I need to coordinate with him.

In GSFFInvocation/GSFFCallInvocation you changed the NSCAssert1 to an explicit [NSExcaption raise:-...]. I take it that's because Asserts are there to be removable by compiler options, but the exception should stay. But you also used sel_get_name in favor of GSNameFromSelector. Was that merely habit?

Yes ... my mistake.

Or is there some technical reason for it (avoiding the check for nil...)? If not, I'd like to commit this patch that uses the GSObjCRuntime functions. People learn from our patches and I think we should try to be consistent in our conventions and use the API we define.

Yes.

I'd kind of like GSObjCRuntime to turn into a real abstraction layer of the runtimes.

This would also introduce:
GS_STATIC_INLINE const char *
GSClassNameFromObject(id obj)
{
 if (obj == 0)
   return 0;
 return object_get_class_name(obj);
}

There are cases I haven't dared yet convert:
object_is_instance(obj)->GSObjCIsInstance(obj)
or
object_get_class(obj)->GSObjCClass(obj)

because of potential differing implementations and requirements (e.g. obj being null, but that has been tested before in most cases). But maybe we should first decide whether the GSObjCRuntime funcktions should in general be nil tolarant.

I prefer tolerance generally.

There are also minor details of the testing subdirectory. It currently still fails to build for me in gstcpport-client:
Making all for test_tool gstcpport-client...
Compiling file gstcpport-client.m ...
gstcpport-client.m: In function `main':
gstcpport-client.m:27: warning: assignment from incompatible pointer type gstcpport-client.m:33: warning: `GSTcpPort' does not respond to `sendBeforeDate:components:from:reserved:'
Linking test_tool gstcpport-client ...
shared_obj/gstcpport-client.o(.data.rel+0xb0): In function `main':
/usr/local/src/cvs/gnustep/core/base/Testing/gstcpport-client.m:24: undefined reference to `__objc_class_name_GSTcpPort'
collect2: ld returned 1 exit status
make[1]: *** [shared_obj/gstcpport-client] Error 1
make: *** [gstcpport-client.all.test-tool.variables] Error 2

I'm sure you can quickly solve it if you have the time, otherwise I'll look into it later. Richt now I'd like to turn my attention to the Header issue.

ok





reply via email to

[Prev in Thread] Current Thread [Next in Thread]