summaryrefslogtreecommitdiffstats
path: root/Objects
diff options
context:
space:
mode:
authorGeorg Brandl <georg@python.org>2006-05-29 19:39:45 (GMT)
committerGeorg Brandl <georg@python.org>2006-05-29 19:39:45 (GMT)
commit2cfaa34dfa2919803a7caf7cfd99aa21d6c40e06 (patch)
tree68fad69a60835e80f0ed91d3d38ea8e961efd2c3 /Objects
parent162997efb10131868b3dd7bec63f1c89b12ec3a5 (diff)
downloadcpython-2cfaa34dfa2919803a7caf7cfd99aa21d6c40e06.zip
cpython-2cfaa34dfa2919803a7caf7cfd99aa21d6c40e06.tar.gz
cpython-2cfaa34dfa2919803a7caf7cfd99aa21d6c40e06.tar.bz2
Correct some value converting strangenesses.
Diffstat (limited to 'Objects')
-rw-r--r--Objects/classobject.c4
-rw-r--r--Objects/object.c2
2 files changed, 3 insertions, 3 deletions
diff --git a/Objects/classobject.c b/Objects/classobject.c
index 2fb16eb..6d2c648d 100644
--- a/Objects/classobject.c
+++ b/Objects/classobject.c
@@ -1136,9 +1136,9 @@ instance_ass_item(PyInstanceObject *inst, Py_ssize_t i, PyObject *item)
if (func == NULL)
return -1;
if (item == NULL)
- arg = Py_BuildValue("i", i);
+ arg = PyInt_FromSsize_t(i);
else
- arg = Py_BuildValue("(iO)", i, item);
+ arg = Py_BuildValue("(nO)", i, item);
if (arg == NULL) {
Py_DECREF(func);
return -1;
diff --git a/Objects/object.c b/Objects/object.c
index a75c14e..59d3960 100644
--- a/Objects/object.c
+++ b/Objects/object.c
@@ -112,7 +112,7 @@ get_counts(void)
if (result == NULL)
return NULL;
for (tp = type_list; tp; tp = tp->tp_next) {
- v = Py_BuildValue("(siii)", tp->tp_name, tp->tp_allocs,
+ v = Py_BuildValue("(snnn)", tp->tp_name, tp->tp_allocs,
tp->tp_frees, tp->tp_maxalloc);
if (v == NULL) {
Py_DECREF(result);