For Programmers: Free Programming Magazines  


Home > Archive > Tcl > November 2007 > Is there a way to dynamically determine (in 'c') if an Tcl_Obj is in









You are viewing an archived Text-only version of the thread. To view this thread in it's original format and/or if you want to reply to this thread please [click here]

 

Author Is there a way to dynamically determine (in 'c') if an Tcl_Obj is in
thelfter@gmail.com

2007-11-24, 7:14 pm


I'm working on adding some Unicode database support to a package I
maintain and I've gotten to the point where I can bind and retrieve
unicode objects when I set a flag to do so.

However it occurred to me that it might be better to just 'magically'
handle the situation... So on to my questions

Is there a way to tell if the result from Tcl_GetUnicodeFromObj() is
actually a unicode object, meaning that it cannot be represented
accurately by a Tcl_GetStringFromObj().

Inversely, if I have a pointer to an area of memory.. casting it as
either as a (uchar) or a (char) is easy, but again is there an easy
way to tell if such a thing is needed.

Opinions are welcome.

Thanks
-Todd
Sponsored Links







Also available: Server administration forum archive | Web Design forum archive | Software forum archive | Hardware reviews archive

Copyright 2008 codecomments.com