TCL9: magic.h ClientData type change helper macros
Now a (void *) but previously an integer. These macros resolve the codebase allowing it to be built against both tcl8 (8.5, 8.6) and tcl9 (9.0). tar -zxvf tcl9.0.0-src.tar.gz cd tcl9.0.0/unix ./configure --enable-symbols --prefix=/opt/tktcl9 make install tar -zxvf tk9.0.0-src.tar.gz cd tk9.0.0/unix ./configure --enable-symbols --prefix=/opt/tktcl9 --with-tcl=/opt/tktcl9/lib make install cd magic ./configure --with-tk=/opt/tktcl9/lib --with-tcl=/opt/tktcl9/lib
This commit is contained in:
parent
a756fe08bd
commit
93c16c8431
|
|
@ -63,6 +63,16 @@ typedef int64_t dlong;
|
|||
typedef pointertype ClientData;
|
||||
#endif
|
||||
|
||||
/* this is not the (int) C type, but the conceptual difference between
|
||||
* a pointer and an integer. The integer width uses same size as pointer
|
||||
* width, so integer width truncations need to be applied at usage site.
|
||||
*/
|
||||
#define CD2PTR(cd) ((void*)(cd))
|
||||
#define CD2INT(cd) ((pointertype)(cd))
|
||||
|
||||
#define PTR2CD(data) ((ClientData)(data))
|
||||
#define INT2CD(data) ((ClientData)(pointertype)(data))
|
||||
|
||||
/* --------------------------- Booleans ------------------------------- */
|
||||
|
||||
typedef unsigned char bool;
|
||||
|
|
|
|||
Loading…
Reference in New Issue