diff Objects/classobject.c @ 3096:84104d6b4ae7 legacy-trunk

Get ordering right for TRACE_REFS/COUNT_ALLOCS combination (otherwise may get inc_count sanity check abort).
author Sjoerd Mullender <sjoerd@acm.org>
date Mon, 18 Sep 1995 10:49:04 +0000
parents c5d852735e7f
children f66306bc0663
line wrap: on
line diff
--- a/Objects/classobject.c	Thu Sep 14 20:57:02 1995 +0000
+++ b/Objects/classobject.c	Mon Sep 18 10:49:04 1995 +0000
@@ -351,11 +351,11 @@
 	/* much too complicated if TRACE_REFS defined */
 	extern long ref_total;
 	inst->ob_type = &Instancetype;
+	NEWREF(inst);
 	ref_total--;		/* compensate for increment in NEWREF */
 #ifdef COUNT_ALLOCS
 	inst->ob_type->tp_alloc--; /* ditto */
 #endif
-	NEWREF(inst);
 #else
 	INCREF(inst);
 #endif /* TRACE_REFS */