gnustep-dev
[Top][All Lists]
Advanced

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

Re: libobjc: should nil be an id?


From: Riccardo Mottola
Subject: Re: libobjc: should nil be an id?
Date: Tue, 1 Aug 2017 09:47:22 +0200
User-agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:49.0) Gecko/20100101 Firefox/49.0 SeaMonkey/2.46

HI,

Daniel Ferreira (theiostream) wrote:
In libobjc2, `nil` is defined as a null pointer cast to an `id`[1].
However, this breaks a lot of stuff targeted to Apple's libobjc which
relies on `nil` and `NULL` being interchangeable.

This is correct. nil is an "empty" object. Nil an empty class while NULL is just an empty pointer, inherited from C.

https://developer.apple.com/documentation/objectivec/objective_c_runtime/null_values


I've experimented removing that cast from the runtime.h header and
this works fine for compiling WebKit. This breaks libs-base and
libs-gui, though, with stuff like:

please share the errors.

Riccardo



reply via email to

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