diff options
author | dgp <dgp@users.sourceforge.net> | 2011-03-24 16:43:38 (GMT) |
---|---|---|
committer | dgp <dgp@users.sourceforge.net> | 2011-03-24 16:43:38 (GMT) |
commit | 884ba1c7869af6d659c880a2dc8a9d7a76f034bd (patch) | |
tree | 6d9027e4d1a122f5ce352145c3e3fc5b84b76306 | |
parent | e0bb5d1a8557e43dce2d26d87c19257445449efc (diff) | |
download | tcl-884ba1c7869af6d659c880a2dc8a9d7a76f034bd.zip tcl-884ba1c7869af6d659c880a2dc8a9d7a76f034bd.tar.gz tcl-884ba1c7869af6d659c880a2dc8a9d7a76f034bd.tar.bz2 |
Restored C++ usability to the memory allocation and free macros.
-rw-r--r-- | ChangeLog | 5 | ||||
-rw-r--r-- | generic/tcl.h | 12 | ||||
-rwxr-xr-x[-rw-r--r--] | generic/tclThreadAlloc.c | 0 |
3 files changed, 11 insertions, 6 deletions
@@ -1,3 +1,8 @@ +2011-03-24 Don Porter <dgp@users.sourceforge.net> + + * generic/tcl.h (ckfree,etc.): Restored C++ usability to the memory + allocation and free macros. + 2011-03-24 Donal K. Fellows <dkf@users.sf.net> * generic/tclFCmd.c (TclFileAttrsCmd): Ensure that any reference to diff --git a/generic/tcl.h b/generic/tcl.h index 2abbb1a..b491944 100644 --- a/generic/tcl.h +++ b/generic/tcl.h @@ -2405,13 +2405,13 @@ EXTERN void Tcl_GetMemoryInfo(Tcl_DString *dsPtr); # define ckalloc(x) \ ((VOID *) Tcl_DbCkalloc((unsigned)(x), __FILE__, __LINE__)) # define ckfree(x) \ - Tcl_DbCkfree((VOID *)(x), __FILE__, __LINE__) + Tcl_DbCkfree((char *)(x), __FILE__, __LINE__) # define ckrealloc(x,y) \ - ((VOID *) Tcl_DbCkrealloc((VOID *)(x), (unsigned)(y), __FILE__, __LINE__)) + ((VOID *) Tcl_DbCkrealloc((char *)(x), (unsigned)(y), __FILE__, __LINE__)) # define attemptckalloc(x) \ ((VOID *) Tcl_AttemptDbCkalloc((unsigned)(x), __FILE__, __LINE__)) # define attemptckrealloc(x,y) \ - ((VOID *) Tcl_AttemptDbCkrealloc((VOID *)(x), (unsigned)(y), __FILE__, __LINE__)) + ((VOID *) Tcl_AttemptDbCkrealloc((char *)(x), (unsigned)(y), __FILE__, __LINE__)) #else /* !TCL_MEM_DEBUG */ @@ -2424,13 +2424,13 @@ EXTERN void Tcl_GetMemoryInfo(Tcl_DString *dsPtr); # define ckalloc(x) \ ((VOID *) Tcl_Alloc((unsigned)(x))) # define ckfree(x) \ - Tcl_Free((VOID *)(x)) + Tcl_Free((char *)(x)) # define ckrealloc(x,y) \ - ((VOID *) Tcl_Realloc((VOID *)(x), (unsigned)(y))) + ((VOID *) Tcl_Realloc((char *)(x), (unsigned)(y))) # define attemptckalloc(x) \ ((VOID *) Tcl_AttemptAlloc((unsigned)(x))) # define attemptckrealloc(x,y) \ - ((VOID *) Tcl_AttemptRealloc((VOID *)(x), (unsigned)(y))) + ((VOID *) Tcl_AttemptRealloc((char *)(x), (unsigned)(y))) # undef Tcl_InitMemory # define Tcl_InitMemory(x) # undef Tcl_DumpActiveMemory diff --git a/generic/tclThreadAlloc.c b/generic/tclThreadAlloc.c index ad1d510..ad1d510 100644..100755 --- a/generic/tclThreadAlloc.c +++ b/generic/tclThreadAlloc.c |