summaryrefslogtreecommitdiffstats
path: root/Objects/object.c
diff options
context:
space:
mode:
authorGuido van Rossum <guido@python.org>1995-01-02 19:07:15 (GMT)
committerGuido van Rossum <guido@python.org>1995-01-02 19:07:15 (GMT)
commitd7047b395e392ce9e46f9a83480ade8b37f6d5b0 (patch)
tree9dabdcc762d49aebc28d82372ca9d79bdbe23cf8 /Objects/object.c
parent1ae940a5870df2f706fa884afd533847f6b0b1a8 (diff)
downloadcpython-d7047b395e392ce9e46f9a83480ade8b37f6d5b0.zip
cpython-d7047b395e392ce9e46f9a83480ade8b37f6d5b0.tar.gz
cpython-d7047b395e392ce9e46f9a83480ade8b37f6d5b0.tar.bz2
Lots of minor changes. Note for mappingobject.c: the hash table pointer
can now be NULL.
Diffstat (limited to 'Objects/object.c')
-rw-r--r--Objects/object.c20
1 files changed, 7 insertions, 13 deletions
diff --git a/Objects/object.c b/Objects/object.c
index 04e1ede..f5c22d1 100644
--- a/Objects/object.c
+++ b/Objects/object.c
@@ -63,7 +63,7 @@ inc_count(tp)
if (tp->tp_alloc == 0) {
/* first time; hang in linked list */
if (tp->tp_next != NULL) /* sanity check */
- abort();
+ fatal("XXX inc_count sanity check");
tp->tp_next = type_list;
type_list = tp;
}
@@ -379,24 +379,18 @@ UNREF(op)
register object *op;
{
register object *p;
- if (op->ob_refcnt < 0) {
- fprintf(stderr, "UNREF negative refcnt\n");
- abort();
- }
+ if (op->ob_refcnt < 0)
+ fatal("UNREF negative refcnt");
if (op == &refchain ||
- op->_ob_prev->_ob_next != op || op->_ob_next->_ob_prev != op) {
- fprintf(stderr, "UNREF invalid object\n");
- abort();
- }
+ op->_ob_prev->_ob_next != op || op->_ob_next->_ob_prev != op)
+ fatal("UNREF invalid object");
#ifdef SLOW_UNREF_CHECK
for (p = refchain._ob_next; p != &refchain; p = p->_ob_next) {
if (p == op)
break;
}
- if (p == &refchain) { /* Not found */
- fprintf(stderr, "UNREF unknown object\n");
- abort();
- }
+ if (p == &refchain) /* Not found */
+ fatal("UNREF unknown object");
#endif
op->_ob_next->_ob_prev = op->_ob_prev;
op->_ob_prev->_ob_next = op->_ob_next;