Changeset adeddd8 in git for external/tcl/tclInt.h
- Timestamp:
- May 29, 2019, 2:53:12 PM (5 years ago)
- Branches:
- ImprovedOutputFile, Timing, master
- Children:
- 969eb19
- Parents:
- e15936c
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
external/tcl/tclInt.h
re15936c radeddd8 1326 1326 1327 1327 extern Tcl_Obj * tclFreeObjList; 1328 1329 #ifdef TCL_COMPILE_STATS1330 extern long tclObjsAlloced;1331 extern long tclObjsFreed;1332 #endif /* TCL_COMPILE_STATS */1333 1328 1334 1329 /* … … 1445 1440 int objc, Tcl_Obj *CONST objv[], int flags)); 1446 1441 EXTERN char * TclpAlloc _ANSI_ARGS_((unsigned int size)); 1447 1442 EXTERN void TclpFree(char *cp); 1448 1443 EXTERN char * TclpRealloc _ANSI_ARGS_((char *ptr, 1449 1444 unsigned int size)); … … 1472 1467 EXTERN int TclPreventAliasLoop _ANSI_ARGS_((Tcl_Interp *interp, 1473 1468 Tcl_Interp *cmdInterp, Tcl_Command cmd)); 1474 EXTERN void TclPrintByteCodeObj _ANSI_ARGS_((Tcl_Interp *interp,1475 Tcl_Obj *objPtr));1476 1469 EXTERN void TclProcCleanupProc _ANSI_ARGS_((Proc *procPtr)); 1477 1470 EXTERN int TclProcCompileProc _ANSI_ARGS_((Tcl_Interp *interp, … … 1688 1681 */ 1689 1682 1690 #ifdef TCL_COMPILE_STATS1691 # define TclIncrObjsAllocated() \1692 tclObjsAlloced++1693 # define TclIncrObjsFreed() \1694 tclObjsFreed++1695 #else1696 # define TclIncrObjsAllocated()1697 # define TclIncrObjsFreed()1698 #endif /* TCL_COMPILE_STATS */1699 1700 #ifdef TCL_MEM_DEBUG1701 # define TclNewObj(objPtr) \1702 (objPtr) = (Tcl_Obj *) Tcl_DbCkalloc(sizeof(Tcl_Obj), __FILE__, __LINE__); \1703 (objPtr)->refCount = 0; \1704 (objPtr)->bytes = tclEmptyStringRep; \1705 (objPtr)->length = 0; \1706 (objPtr)->typePtr = NULL; \1707 TclIncrObjsAllocated()1708 # define TclDbNewObj(objPtr, file, line) \1709 (objPtr) = (Tcl_Obj *) Tcl_DbCkalloc(sizeof(Tcl_Obj), (file), (line)); \1710 (objPtr)->refCount = 0; \1711 (objPtr)->bytes = tclEmptyStringRep; \1712 (objPtr)->length = 0; \1713 (objPtr)->typePtr = NULL; \1714 TclIncrObjsAllocated()1715 # define TclDecrRefCount(objPtr) \1716 if (--(objPtr)->refCount <= 0) { \1717 if ((objPtr)->refCount < -1) \1718 panic("Reference count for %lx was negative: %s line %d", \1719 (objPtr), __FILE__, __LINE__); \1720 if (((objPtr)->bytes != NULL) \1721 && ((objPtr)->bytes != tclEmptyStringRep)) { \1722 ckfree((char *) (objPtr)->bytes); \1723 } \1724 if (((objPtr)->typePtr != NULL) \1725 && ((objPtr)->typePtr->freeIntRepProc != NULL)) { \1726 (objPtr)->typePtr->freeIntRepProc(objPtr); \1727 } \1728 ckfree((char *) (objPtr)); \1729 TclIncrObjsFreed(); \1730 }1731 #else /* not TCL_MEM_DEBUG */1732 1683 # define TclNewObj(objPtr) \ 1733 1684 if (tclFreeObjList == NULL) { \ … … 1740 1691 (objPtr)->bytes = tclEmptyStringRep; \ 1741 1692 (objPtr)->length = 0; \ 1742 (objPtr)->typePtr = NULL; \ 1743 TclIncrObjsAllocated() 1693 (objPtr)->typePtr = NULL; 1744 1694 # define TclDecrRefCount(objPtr) \ 1745 1695 if (--(objPtr)->refCount <= 0) { \ … … 1754 1704 (objPtr)->internalRep.otherValuePtr = (VOID *) tclFreeObjList; \ 1755 1705 tclFreeObjList = (objPtr); \ 1756 TclIncrObjsFreed(); \1757 1706 } 1758 #endif /* TCL_MEM_DEBUG */1759 1707 1760 1708 /*
Note:
See TracChangeset
for help on using the changeset viewer.