From 87faa2c8dcda00d97724901c8641e4d83984c084 Mon Sep 17 00:00:00 2001 From: Ted Ross Date: Fri, 27 Sep 2013 13:19:44 +0000 Subject: NO-JIRA - Fixed three aliasing issues that broke a "Release" build. git-svn-id: https://svn.apache.org/repos/asf/qpid/trunk@1526892 13f79535-47bb-0310-9956-ffa450edef68 --- qpid/extras/dispatch/src/python_embedded.c | 7 +++++-- qpid/extras/dispatch/src/router_node.c | 3 ++- 2 files changed, 7 insertions(+), 3 deletions(-) (limited to 'qpid/extras/dispatch/src') diff --git a/qpid/extras/dispatch/src/python_embedded.c b/qpid/extras/dispatch/src/python_embedded.c index 2db8f583de..97ece06c86 100644 --- a/qpid/extras/dispatch/src/python_embedded.c +++ b/qpid/extras/dispatch/src/python_embedded.c @@ -614,6 +614,9 @@ static void dx_register_log_constant(PyObject *module, const char *name, uint32_ static void dx_python_setup() { + PyObject *laType = (PyObject*) &LogAdapterType; + PyObject *ioaType = (PyObject*) &IoAdapterType; + LogAdapterType.tp_new = PyType_GenericNew; IoAdapterType.tp_new = PyType_GenericNew; if ((PyType_Ready(&LogAdapterType) < 0) || (PyType_Ready(&IoAdapterType) < 0)) { @@ -626,7 +629,7 @@ static void dx_python_setup() // // Add LogAdapter // - Py_INCREF(&LogAdapterType); + Py_INCREF(laType); PyModule_AddObject(m, "LogAdapter", (PyObject*) &LogAdapterType); dx_register_log_constant(m, "LOG_TRACE", LOG_TRACE); @@ -638,7 +641,7 @@ static void dx_python_setup() dx_register_log_constant(m, "LOG_CRITICAL", LOG_CRITICAL); // - Py_INCREF(&IoAdapterType); + Py_INCREF(ioaType); PyModule_AddObject(m, "IoAdapter", (PyObject*) &IoAdapterType); Py_INCREF(m); diff --git a/qpid/extras/dispatch/src/router_node.c b/qpid/extras/dispatch/src/router_node.c index dc63a45451..806363c5ce 100644 --- a/qpid/extras/dispatch/src/router_node.c +++ b/qpid/extras/dispatch/src/router_node.c @@ -1132,6 +1132,7 @@ static PyTypeObject RouterAdapterType = { static void dx_router_python_setup(dx_router_t *router) { + PyObject *raType = (PyObject*) &RouterAdapterType; PyObject *pDispatchModule = dx_python_module(); RouterAdapterType.tp_new = PyType_GenericNew; @@ -1141,7 +1142,7 @@ static void dx_router_python_setup(dx_router_t *router) return; } - Py_INCREF(&RouterAdapterType); + Py_INCREF(raType); PyModule_AddObject(pDispatchModule, "RouterAdapter", (PyObject*) &RouterAdapterType); // -- cgit v1.2.1