Repository: qpid-proton Updated Branches: refs/heads/master de94b253a -> 603c0e725
PROTON-515: Fixed hand built swig python binding code to build with C89 - We now have to build the SWIG generated code with C not C++. Project: http://git-wip-us.apache.org/repos/asf/qpid-proton/repo Commit: http://git-wip-us.apache.org/repos/asf/qpid-proton/commit/603c0e72 Tree: http://git-wip-us.apache.org/repos/asf/qpid-proton/tree/603c0e72 Diff: http://git-wip-us.apache.org/repos/asf/qpid-proton/diff/603c0e72 Branch: refs/heads/master Commit: 603c0e725682fc05941d91d2b92529c782136e21 Parents: de94b25 Author: Andrew Stitcher <[email protected]> Authored: Tue Feb 16 13:20:49 2016 -0500 Committer: Andrew Stitcher <[email protected]> Committed: Tue Feb 16 13:20:49 2016 -0500 ---------------------------------------------------------------------- proton-c/bindings/python/cproton.i | 22 +++++++++++++--------- 1 file changed, 13 insertions(+), 9 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/qpid-proton/blob/603c0e72/proton-c/bindings/python/cproton.i ---------------------------------------------------------------------- diff --git a/proton-c/bindings/python/cproton.i b/proton-c/bindings/python/cproton.i index 6fb213c..b173dd8 100644 --- a/proton-c/bindings/python/cproton.i +++ b/proton-c/bindings/python/cproton.i @@ -346,11 +346,13 @@ int pn_ssl_get_cert_fingerprint(pn_ssl_t *ssl, char *OUTPUT, size_t MAX_OUTPUT_S tb = Py_None; Py_INCREF(tb); } - PyObject *result2 = PyObject_CallMethodObjArgs(pyh->handler, pyh->exception, exc, val, tb, NULL); - if (!result2) { - PyErr_PrintEx(true); + { + PyObject *result2 = PyObject_CallMethodObjArgs(pyh->handler, pyh->exception, exc, val, tb, NULL); + if (!result2) { + PyErr_PrintEx(true); + } + Py_XDECREF(result2); } - Py_XDECREF(result2); Py_XDECREF(exc); Py_XDECREF(val); Py_XDECREF(tb); @@ -365,11 +367,13 @@ int pn_ssl_get_cert_fingerprint(pn_ssl_t *ssl, char *OUTPUT, size_t MAX_OUTPUT_S pn_handler_t *chandler = pn_handler_new(pni_pydispatch, sizeof(pni_pyh_t), pni_pyh_finalize); pni_pyh_t *phy = pni_pyh(chandler); phy->handler = handler; - SWIG_PYTHON_THREAD_BEGIN_BLOCK; - phy->dispatch = PyString_FromString("dispatch"); - phy->exception = PyString_FromString("exception"); - Py_INCREF(phy->handler); - SWIG_PYTHON_THREAD_END_BLOCK; + { + SWIG_PYTHON_THREAD_BEGIN_BLOCK; + phy->dispatch = PyString_FromString("dispatch"); + phy->exception = PyString_FromString("exception"); + Py_INCREF(phy->handler); + SWIG_PYTHON_THREAD_END_BLOCK; + } return chandler; } --------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
