Posted to tcl by schelte at Sun Jul 13 14:07:38 GMT 2025view raw

  1. #undef Tcl_IncrRefCount
  2. #define Tcl_IncrRefCount(objPtr) \
  3. printf("%d: Tcl_IncrRefCount(%p) == %d\n", __LINE__, objPtr, ++(objPtr)->refCount);
  4. #undef Tcl_DecrRefCount
  5. #define Tcl_DecrRefCount(objPtr) \
  6. do { \
  7. Tcl_Obj *_objPtr = (objPtr); \
  8. printf("%d: Tcl_DecrRefCount(%p) == %d\n", __LINE__, objPtr, --(_objPtr)->refCount); \
  9. if (_objPtr->refCount <= 0) { \
  10. TclFreeObj(_objPtr); \
  11. } \
  12. } while(0)

Add a comment

Please note that this site uses the meta tags nofollow,noindex for all pages that contain comments.
Items are closed for new comments after 1 week