Fix refcount error and use cythons <bytes> to convert a python object to char*
This commit is contained in:
parent
29551902e7
commit
b4fb12589d
1 changed files with 6 additions and 3 deletions
|
@ -289,10 +289,11 @@ cdef cpp_bool merge_callback(
|
||||||
return False
|
return False
|
||||||
|
|
||||||
except Exception:
|
except Exception:
|
||||||
|
tb = traceback.format_exc()
|
||||||
logger.Log(
|
logger.Log(
|
||||||
log,
|
log,
|
||||||
"Error in merge_callback: %s",
|
"Error in merge_callback: %s",
|
||||||
PyString_AsString(traceback.format_exc()))
|
<bytes>tb)
|
||||||
return False
|
return False
|
||||||
|
|
||||||
cdef cpp_bool full_merge_callback(
|
cdef cpp_bool full_merge_callback(
|
||||||
|
@ -322,10 +323,11 @@ cdef cpp_bool full_merge_callback(
|
||||||
return False
|
return False
|
||||||
|
|
||||||
except Exception:
|
except Exception:
|
||||||
|
tb = traceback.format_exc()
|
||||||
logger.Log(
|
logger.Log(
|
||||||
log,
|
log,
|
||||||
"Error in full_merge_callback: %s",
|
"Error in full_merge_callback: %s",
|
||||||
PyString_AsString(traceback.format_exc()))
|
<bytes>tb)
|
||||||
return False
|
return False
|
||||||
|
|
||||||
cdef cpp_bool partial_merge_callback(
|
cdef cpp_bool partial_merge_callback(
|
||||||
|
@ -350,10 +352,11 @@ cdef cpp_bool partial_merge_callback(
|
||||||
return False
|
return False
|
||||||
|
|
||||||
except Exception:
|
except Exception:
|
||||||
|
tb = traceback.format_exc()
|
||||||
logger.Log(
|
logger.Log(
|
||||||
log,
|
log,
|
||||||
"Error in partial_merge_callback: %s",
|
"Error in partial_merge_callback: %s",
|
||||||
PyString_AsString(traceback.format_exc()))
|
<bytes>tb)
|
||||||
|
|
||||||
return False
|
return False
|
||||||
##############################################
|
##############################################
|
||||||
|
|
Loading…
Reference in a new issue