Maybe clang treats 'nil' specially and it does not have to be #define'd? But I would like to know about assumptions WebKit makes and what kind of errors you get. And what type does WebKit exactly expect nil to be?
On Tue, Aug 1, 2017, 07:01 Fred Kiefer <[email protected]> wrote: > > > Am 01.08.2017 um 01:43 schrieb Daniel Ferreira (theiostream) < > [email protected]>: > > 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. > > > > 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: > > > >> NSKeyedUnarchiver.m:862:33: error: cast to union type from type 'void > *' not present in union > >> GSIArrayAddItem(_objMap, (GSIArrayItem)nil); > > > > How do you suggest handling this issue? > > > > -- Daniel. > > > > [1]: https://github.com/gnustep/libobjc2/blob/master/objc/runtime.h#L207 > > > Hi Daniel, > > as I wrote before I think this is a bug on Apple’s side. nil should be an > id, that is the whole purpose of this variable. > Are the compiler messages you get when compiling WebKit warnings or > errors? If they are warnings we may just ignore them for now and only > report a bug to WebKit. If it is an error we need a work around. How about > a redefine in a specific header that only gets included when compiling > Apple software? > > Fred > _______________________________________________ > Gnustep-dev mailing list > [email protected] > https://lists.gnu.org/mailman/listinfo/gnustep-dev >
_______________________________________________ Gnustep-dev mailing list [email protected] https://lists.gnu.org/mailman/listinfo/gnustep-dev
