diff options
| author | Sebastian Heinlein <sebi@sebi-desktop> | 2007-03-12 00:17:29 +0100 |
|---|---|---|
| committer | Sebastian Heinlein <sebi@sebi-desktop> | 2007-03-12 00:17:29 +0100 |
| commit | 3df4fd5eeb785bc335f8b996d13b39ea69d90770 (patch) | |
| tree | 18ec7a93cb4e7b2fa431e77240e988cd8f3a23d2 /python | |
| parent | e061e734914ef5f87f4754ac38100cb6614a9f42 (diff) | |
| parent | 89ac70a4cdc9507e6db3921497680aea95b6a7c2 (diff) | |
| download | python-apt-3df4fd5eeb785bc335f8b996d13b39ea69d90770.tar.gz | |
* merge
Diffstat (limited to 'python')
| -rw-r--r-- | python/string.cc | 6 |
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; |
