diff options
| author | Julian Andres Klode <jak@debian.org> | 2014-01-27 20:27:26 +0100 |
|---|---|---|
| committer | Julian Andres Klode <jak@debian.org> | 2014-01-27 20:28:22 +0100 |
| commit | c5ff65130e3c4353bfcdf1dcf3ab1d912597601d (patch) | |
| tree | 1f632dfc312377d3c761ed5c18ed228c656e7e95 | |
| parent | defc7e469043be7ac2253dca1485a87284399f73 (diff) | |
| download | python-apt-c5ff65130e3c4353bfcdf1dcf3ab1d912597601d.tar.gz | |
python/generic.h: Fix MkPyNumber to work if char is unsigned.
We currently consider two cases "unsigned char" and "char". This works
as long as "char" is signed, but this is not guaranteed. Change "char"
to "signed char" instead.
| -rw-r--r-- | python/generic.h | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/python/generic.h b/python/generic.h index 26736f1a..bcc4a5e4 100644 --- a/python/generic.h +++ b/python/generic.h @@ -250,7 +250,7 @@ inline PyObject *MkPyNumber(long long o) { return PyLong_FromLongLong(o); } inline PyObject *MkPyNumber(long o) { return PyInt_FromLong(o); } inline PyObject *MkPyNumber(int o) { return PyInt_FromLong(o); } inline PyObject *MkPyNumber(short o) { return PyInt_FromLong(o); } -inline PyObject *MkPyNumber(char o) { return PyInt_FromLong(o); } +inline PyObject *MkPyNumber(signed char o) { return PyInt_FromLong(o); } inline PyObject *MkPyNumber(double o) { return PyFloat_FromDouble(o); } |
