Artifacts Associated With Ticket 2163447
Ticket change [faed6763d4] (rid 91971) by das on 2008-10-13 11:55:08:
- assignee initialized to: "dkf"
- cmimetype initialized to: "text/plain"
- comment initialized to:
Class is a reserved type in Objective C, its use by tclOOInt.h makes it impossible to include that file in any objc code or to compile the core with an objc compiler, due to errors like: tcl/generic/tclOOInt.h:255: error: conflicting types for 'Class' <built-in>:0: error: previous declaration of 'Class' was here the patch below works around the issue, it would probably be even better to globally rename the unadorned TclOO types Class and Object to TclClass and TclObject diff --git c/tcl/generic/tclOOInt.h w/tcl/generic/tclOOInt.h index 56edcc4..8b4b107 100644 --- c/tcl/generic/tclOOInt.h +++ w/tcl/generic/tclOOInt.h @@ -15,6 +15,8 @@ #include <tclInt.h> #include "tclOO.h" +#define Class TclClass + /* * Forward declarations. */
- foundin initialized to: "obsolete: 8.6a2"
- is_private initialized to: "0"
- priority initialized to: "8"
- resolution initialized to: "None"
- status initialized to: "Open"
- submitter initialized to: "das"
- subsystem initialized to: "35. TclOO Package"
- title initialized to: "tclOOInt.h Class type conflicts with Objective C"
- type initialized to: "Bug"
Ticket change [e246d4bf4c] (rid 87595) by dkf on 2008-10-13 20:34:16:
- icomment:
Assuming that __OBJC__ is the #def to look for to detect Objective C (which it seems to be from both the OSX headers and a grep online) it's now fixed.
- login: "dkf"
- mimetype: "text/plain"
- username: "dkf"
- icomment:
Ticket change [e00fd2f5ab] (rid 115127) by dkf on 2008-10-13 20:34:17:
- closedate changed to: "2008-10-13T13:34:17"
- closer changed to: "dkf"
- resolution changed to: "Fixed"
- status changed to: "Closed"
Ticket change [3a1285625a] (rid 112501) by das on 2008-10-13 21:57:42:
- icomment:
Hi Donal, __OBJC__ is correct, thanks. Is there a reason not do the defines unconditionally? I'm concerned that there will be issues if some source files in a project are compiled with objc and others not (as will certainly be the case in Tk when we start using Cocoa APIs)
- login: "das"
- mimetype: "text/plain"
- username: "das"
- icomment:
Ticket change [eca03a9739] (rid 103740) by dkf on 2008-10-13 22:04:20:
- icomment:
The only files that use Class/Object are files that include tclOOInt.h, as nothing else declares those types — I'm kind-of careful about such things! — so the fix that's there should be adequate. If someone's poking their nose inside improperly and gets burned, we don't care (or we're in the core and can fix things pretty easily by including the correct header).
- login: "dkf"
- mimetype: "text/plain"
- username: "dkf"
- icomment:
Ticket change [a427d1e191] (rid 110163) by das on 2008-10-13 22:22:16:
- icomment:
right, good, no problem then, thanks (I somehow thought tclOOInt.h resp. tclOOIntDecls.h was included by tclInt.h, but I now see that is not the case, so there is no issue) The only reason I noticed this BTW is that I am building the whole of tcl & tk statically with 'gcc -x objective-c' for development...
- login: "das"
- mimetype: "text/plain"
- username: "das"
- icomment: