summaryrefslogtreecommitdiffstats
path: root/Objects/classobject.c
diff options
context:
space:
mode:
Diffstat (limited to 'Objects/classobject.c')
-rw-r--r--Objects/classobject.c8
1 files changed, 2 insertions, 6 deletions
diff --git a/Objects/classobject.c b/Objects/classobject.c
index 6ef17b2..9870b6e 100644
--- a/Objects/classobject.c
+++ b/Objects/classobject.c
@@ -344,11 +344,7 @@ instance_dealloc(inst)
INCREF(inst);
err_fetch(&error_type, &error_value, &error_traceback);
if ((del = instance_getattr1(inst, "__del__")) != NULL) {
- object *args = newtupleobject(0);
- object *res = args;
- if (res != NULL)
- res = call_object(del, args);
- XDECREF(args);
+ object *res = call_object(del, (object *)NULL);
DECREF(del);
XDECREF(res);
/* XXX If __del__ raised an exception, it is ignored! */
@@ -692,7 +688,7 @@ instance_item(inst, i)
func = instance_getattr(inst, "__getitem__");
if (func == NULL)
return NULL;
- arg = newintobject((long)i);
+ arg = mkvalue("(i)", i);
if (arg == NULL) {
DECREF(func);
return NULL;