Notes |
|
(0029178)
|
David Gobbi
|
2012-09-12 08:21
|
|
This is a duplicate of bug report 13198, perhaps you can be more helpful than the person who reported this before.
What version of Tcl/Tk are you using? All the documentation that I have read says that ckalloc() returns a "char *". And on every computer that I've ever built VTK on, ckalloc() returns a "char *". So why does it return a "void *" on your machine? |
|
|
(0029183)
|
Pietro Cerutti
|
2012-09-12 08:45
|
|
It's tcl8.6,
# define ckalloc(x) \
((VOID *) Tcl_Alloc((unsigned)(x))
while tcl8.5 had
# define ckalloc(x) Tcl_Alloc(x)
And in both cases:
EXTERN char * Tcl_Alloc(unsigned int size);
I wasn't careful enough in the first place.. we should probably place a few casts around, surrounded by
#if TCL_MAJOR_VERSION == 8 && TCL_MINOR_VERSION >= 6
// cast here
#else
// no cast needed here
#endif |
|
|
(0029185)
|
David Gobbi
|
2012-09-12 09:05
|
|
I'll just add the cast with a comment to say why it is necessary. The cast will work with all versions of Tcl. |
|
|
(0029187)
|
Pietro Cerutti
|
2012-09-12 09:06
|
|
Makes sense to me. Thanks! |
|
|
(0029290)
|
David Gobbi
|
2012-09-28 08:56
|
|
Fixed by commit 376579aa. |
|