diff --git a/py.cpp b/py.cpp index 562d1989..bc1d30f3 100644 --- a/py.cpp +++ b/py.cpp @@ -170,6 +170,26 @@ unsigned short from_python(PyObject* p, py::Type type) return integer_from_python(p, type); } +PyObject* to_python(unsigned char i) +{ + return integer_to_python(i); +} + +unsigned char from_python(PyObject* p, py::Type type) +{ + return integer_from_python(p, type); +} + +PyObject* to_python(signed char i) +{ + return integer_to_python(i); +} + +signed char from_python(PyObject* p, py::Type type) +{ + return integer_from_python(p, type); +} + PyObject* to_python(unsigned long x) { return integer_to_python(x); diff --git a/py.h b/py.h index 5d64c858..3818e73a 100644 --- a/py.h +++ b/py.h @@ -73,6 +73,14 @@ PyObject* to_python(unsigned short); unsigned short from_python(PyObject*, py::Type); unsigned short from_python(PyObject*, py::Type); +PyObject* to_python(signed char); +signed char from_python(PyObject*, py::Type); +signed char from_python(PyObject*, py::Type); + +PyObject* to_python(unsigned char); +unsigned char from_python(PyObject*, py::Type); +unsigned char from_python(PyObject*, py::Type); + PyObject* to_python(float); float from_python(PyObject*, py::Type); float from_python(PyObject*, py::Type); @@ -269,6 +277,16 @@ inline unsigned short from_python(PyObject* p, py::Type) return from_python(p, py::Type()); } +inline signed char from_python(PyObject* p, py::Type) +{ + return from_python(p, py::Type()); +} + +inline unsigned char from_python(PyObject* p, py::Type) +{ + return from_python(p, py::Type()); +} + inline unsigned long from_python(PyObject* p, py::Type) { return from_python(p, py::Type());