mirror of
https://github.com/signalwire/freeswitch.git
synced 2026-07-07 04:41:53 +00:00
fix the evil snake (again)
git-svn-id: http://svn.freeswitch.org/svn/freeswitch/trunk@9051 d0543943-73ff-0310-b7d9-9358b9ac24b2
This commit is contained in:
@@ -1,34 +1,27 @@
|
||||
SWITCH_BEGIN_EXTERN_C
|
||||
|
||||
PyObject *mod_python_conjure_event(PyObject *module, switch_event_t *event, const char *name)
|
||||
PyObject *mod_python_conjure_event(switch_event_t *event)
|
||||
{
|
||||
PyObject *obj;
|
||||
Event *result = new Event(event, 0);
|
||||
|
||||
obj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_Event, SWIG_POINTER_OWN );
|
||||
if (module && name) {
|
||||
PyDict_SetItem(PyModule_GetDict(module), Py_BuildValue("s", name), obj);
|
||||
}
|
||||
|
||||
return obj;
|
||||
}
|
||||
|
||||
|
||||
PyObject *mod_python_conjure_stream(PyObject *module, switch_stream_handle_t *stream, const char *name)
|
||||
PyObject *mod_python_conjure_stream(switch_stream_handle_t *stream)
|
||||
{
|
||||
PyObject *obj;
|
||||
Stream *result = new Stream(stream);
|
||||
|
||||
obj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_Stream, SWIG_POINTER_OWN );
|
||||
|
||||
if (module && name) {
|
||||
PyDict_SetItem(PyModule_GetDict(module), Py_BuildValue("s", name), obj);
|
||||
}
|
||||
|
||||
return obj;
|
||||
}
|
||||
|
||||
PyObject *mod_python_conjure_session(PyObject *module, switch_core_session_t *session, const char *name)
|
||||
PyObject *mod_python_conjure_session(PyObject *module, switch_core_session_t *session)
|
||||
{
|
||||
PyObject *obj;
|
||||
|
||||
@@ -38,11 +31,13 @@ PyObject *mod_python_conjure_session(PyObject *module, switch_core_session_t *se
|
||||
result->setPython(module);
|
||||
result->setSelf(obj);
|
||||
|
||||
#if 0
|
||||
if (module && name) {
|
||||
PyDict_SetItem(PyModule_GetDict(module), Py_BuildValue("s", name), obj);
|
||||
Py_DECREF(obj);
|
||||
}
|
||||
|
||||
#endif
|
||||
|
||||
return obj;
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user