[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
libobjc: should nil be an id?
From: |
Daniel Ferreira (theiostream) |
Subject: |
libobjc: should nil be an id? |
Date: |
Mon, 31 Jul 2017 20:43:27 -0300 |
Hi,
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
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- libobjc: should nil be an id?,
Daniel Ferreira (theiostream) <=