Fix refcount error and use cythons <bytes> to convert a python object to char*

This commit is contained in:
hofmockel 2014-01-15 09:53:27 +01:00
parent 29551902e7
commit b4fb12589d

View file

@ -289,10 +289,11 @@ cdef cpp_bool merge_callback(
return False
except Exception:
tb = traceback.format_exc()
logger.Log(
log,
"Error in merge_callback: %s",
PyString_AsString(traceback.format_exc()))
<bytes>tb)
return False
cdef cpp_bool full_merge_callback(
@ -322,10 +323,11 @@ cdef cpp_bool full_merge_callback(
return False
except Exception:
tb = traceback.format_exc()
logger.Log(
log,
"Error in full_merge_callback: %s",
PyString_AsString(traceback.format_exc()))
<bytes>tb)
return False
cdef cpp_bool partial_merge_callback(
@ -350,10 +352,11 @@ cdef cpp_bool partial_merge_callback(
return False
except Exception:
tb = traceback.format_exc()
logger.Log(
log,
"Error in partial_merge_callback: %s",
PyString_AsString(traceback.format_exc()))
<bytes>tb)
return False
##############################################