summaryrefslogtreecommitdiffstats
path: root/generic/tcl.h
diff options
context:
space:
mode:
authorericm <ericm>2000-09-14 18:42:27 (GMT)
committerericm <ericm>2000-09-14 18:42:27 (GMT)
commit9e68d5fcbb5c7e9d1e17dcaacab6688f786bcd10 (patch)
treede9d337513da3daa50909f5c0d11116e6ab9262e /generic/tcl.h
parent62db39876a0a1797a02f9ab37238f2d377295696 (diff)
downloadtcl-9e68d5fcbb5c7e9d1e17dcaacab6688f786bcd10.zip
tcl-9e68d5fcbb5c7e9d1e17dcaacab6688f786bcd10.tar.gz
tcl-9e68d5fcbb5c7e9d1e17dcaacab6688f786bcd10.tar.bz2
* doc/Alloc.3: Added entries for Tcl_AttemptAlloc, Tcl_AttempRealloc.
* doc/StringObj.3: Added entry for Tcl_AttemptSetObjLength. * generic/tclDecls.h: * generic/tclStubInit.c: Regen'ed stubs files from new tcl.decls. * generic/tcl.decls: Added stubs for the Tcl_Attempt* memory allocators and for Tcl_AttemptSetObjLength. * generic/tcl.h: Added #define's for attemptckalloc, attemptckrealloc, which map to the Tcl_Attempt* memory allocators. * generic/tclCkalloc.c: Added non-panic'ing versions of Tcl_Alloc, Tcl_Realloc, etc.; these are called Tcl_AttemptAlloc, Tcl_AttemptRealloc, etc. These are used by Tcl_AttemptSetObjLength and the string obj append functions. * generic/tclStringObj.c: Modified string growth algorithm to use doubling algorithm as long as possible, and only fall back when that fails. Added Tcl_AttemptSetObjLength, and modified AppendUnicodeToUnicodeRep, AppendUtfToUtfRep, and Tcl_AppendStringsToObjVA to support this.
Diffstat (limited to 'generic/tcl.h')
-rw-r--r--generic/tcl.h7
1 files changed, 5 insertions, 2 deletions
diff --git a/generic/tcl.h b/generic/tcl.h
index 22f4f88..5d239e9 100644
--- a/generic/tcl.h
+++ b/generic/tcl.h
@@ -12,7 +12,7 @@
* See the file "license.terms" for information on usage and redistribution
* of this file, and for a DISCLAIMER OF ALL WARRANTIES.
*
- * RCS: @(#) $Id: tcl.h,v 1.78 2000/09/06 18:50:15 hobbs Exp $
+ * RCS: @(#) $Id: tcl.h,v 1.79 2000/09/14 18:42:29 ericm Exp $
*/
#ifndef _TCL
@@ -1341,7 +1341,8 @@ typedef int (Tcl_DriverGetHandleProc) _ANSI_ARGS_((
# define ckalloc(x) Tcl_DbCkalloc(x, __FILE__, __LINE__)
# define ckfree(x) Tcl_DbCkfree(x, __FILE__, __LINE__)
# define ckrealloc(x,y) Tcl_DbCkrealloc((x), (y),__FILE__, __LINE__)
-
+# define attemptckalloc(x) Tcl_AttempDbCkalloc(x, __FILE__, __LINE__)
+# define attemptckrealloc(x,y) Tcl_AttemptDbCkrealloc((x), (y), __FILE__, __LINE__)
#else /* !TCL_MEM_DEBUG */
/*
@@ -1354,6 +1355,8 @@ typedef int (Tcl_DriverGetHandleProc) _ANSI_ARGS_((
# define ckalloc(x) Tcl_Alloc(x)
# define ckfree(x) Tcl_Free(x)
# define ckrealloc(x,y) Tcl_Realloc(x,y)
+# define attemptckalloc(x) Tcl_AttemptAlloc(x)
+# define attemptckrealloc(x,y) Tcl_AttemptRealloc(x,y)
# define Tcl_InitMemory(x)
# define Tcl_DumpActiveMemory(x)
# define Tcl_ValidateAllMemory(x,y)