2
0
mirror of https://github.com/boostorg/python.git synced 2026-01-21 17:12:22 +00:00

Add from/to_python for signed char and unsigned char

[SVN r8130]
This commit is contained in:
Dave Abrahams
2000-11-04 09:28:46 +00:00
parent 8fdc849980
commit 7a3a0229d5
2 changed files with 38 additions and 0 deletions

20
py.cpp
View File

@@ -170,6 +170,26 @@ unsigned short from_python(PyObject* p, py::Type<unsigned short> 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<unsigned char> 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<signed char> type)
{
return integer_from_python(p, type);
}
PyObject* to_python(unsigned long x)
{
return integer_to_python(x);