diff options
Diffstat (limited to 'lldb/scripts/Python')
-rw-r--r-- | lldb/scripts/Python/python-typemaps.swig | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/lldb/scripts/Python/python-typemaps.swig b/lldb/scripts/Python/python-typemaps.swig index 91d4c7360d5..a3ce3b3de72 100644 --- a/lldb/scripts/Python/python-typemaps.swig +++ b/lldb/scripts/Python/python-typemaps.swig @@ -25,6 +25,18 @@ } } +%typemap(in) lldb::tid_t { + if (PyInt_Check($input)) + $1 = PyInt_AsLong($input); + else if (PyLong_Check($input)) + $1 = PyLong_AsLong($input); + else + { + PyErr_SetString(PyExc_ValueError, "Expecting an integer"); + return NULL; + } +} + %typemap(typecheck) char ** { /* Check if is a list */ $1 = 1; |