summaryrefslogtreecommitdiff
path: root/python
diff options
context:
space:
mode:
authorSebastian Heinlein <sebi@sebi-desktop>2007-03-12 00:17:29 +0100
committerSebastian Heinlein <sebi@sebi-desktop>2007-03-12 00:17:29 +0100
commit3df4fd5eeb785bc335f8b996d13b39ea69d90770 (patch)
tree18ec7a93cb4e7b2fa431e77240e988cd8f3a23d2 /python
parente061e734914ef5f87f4754ac38100cb6614a9f42 (diff)
parent89ac70a4cdc9507e6db3921497680aea95b6a7c2 (diff)
downloadpython-apt-3df4fd5eeb785bc335f8b996d13b39ea69d90770.tar.gz
* merge
Diffstat (limited to 'python')
-rw-r--r--python/string.cc6
1 files changed, 4 insertions, 2 deletions
diff --git a/python/string.cc b/python/string.cc
index 16adc8cd..d0926da5 100644
--- a/python/string.cc
+++ b/python/string.cc
@@ -53,9 +53,11 @@ PyObject *StrSizeToStr(PyObject *Self,PyObject *Args)
if (PyArg_ParseTuple(Args,"O",&Obj) == 0)
return 0;
if (PyInt_Check(Obj))
- return CppPyString(SizeToStr(PyInt_AS_LONG(Obj)));
+ return CppPyString(SizeToStr(PyInt_AsLong(Obj)));
+ if (PyLong_Check(Obj))
+ return CppPyString(SizeToStr(PyLong_AsLong(Obj)));
if (PyFloat_Check(Obj))
- return CppPyString(SizeToStr(PyFloat_AS_DOUBLE(Obj)));
+ return CppPyString(SizeToStr(PyFloat_AsDouble(Obj)));
PyErr_SetString(PyExc_TypeError,"Only understand integers and floats");
return 0;