summaryrefslogtreecommitdiffstats
path: root/libshiboken
diff options
context:
space:
mode:
authorMarcelo Lira <marcelo.lira@openbossa.org>2011-09-15 18:52:16 -0300
committerMarcelo Lira <marcelo.lira@openbossa.org>2011-12-09 20:28:06 -0300
commit7ab63c458caf49266bf088e086712c951b0f51d9 (patch)
tree9e0cff20eddb7ccd9bfe665db0d16b07f5550025 /libshiboken
parent07e0cf74f41ba112ff7ad6a21a6b5463e84746ca (diff)
downloadshiboken-7ab63c458caf49266bf088e086712c951b0f51d9.tar.gz
shiboken-7ab63c458caf49266bf088e086712c951b0f51d9.tar.xz
shiboken-7ab63c458caf49266bf088e086712c951b0f51d9.zip
SbkConverter's copyToPython function now returns Python None for C++ NULL pointer.
Diffstat (limited to 'libshiboken')
-rw-r--r--libshiboken/sbkconverter.cpp2
1 files changed, 2 insertions, 0 deletions
diff --git a/libshiboken/sbkconverter.cpp b/libshiboken/sbkconverter.cpp
index 3fd04db9..b5223cc8 100644
--- a/libshiboken/sbkconverter.cpp
+++ b/libshiboken/sbkconverter.cpp
@@ -164,6 +164,8 @@ PyObject* referenceToPython(SbkObjectType* type, const void* cppIn)
static inline PyObject* CopyCppToPython(SbkConverter* converter, const void* cppIn)
{
+ if (!cppIn)
+ Py_RETURN_NONE;
return converter->copyToPython(cppIn);
}
PyObject* copyToPython(SbkObjectType* type, const void* cppIn)