[Freeswitch-svn] [commit] r3580 - freeswitch/branches/jkr888/trunk/src/mod/languages/mod_python
Freeswitch SVN
jkr888 at freeswitch.org
Fri Dec 8 09:59:17 EST 2006
Author: jkr888
Date: Fri Dec 8 09:59:16 2006
New Revision: 3580
Modified:
freeswitch/branches/jkr888/trunk/src/mod/languages/mod_python/freeswitch_python.h
freeswitch/branches/jkr888/trunk/src/mod/languages/mod_python/mod_python.i
freeswitch/branches/jkr888/trunk/src/mod/languages/mod_python/mod_python_wrap.cpp
Log:
Modified: freeswitch/branches/jkr888/trunk/src/mod/languages/mod_python/freeswitch_python.h
==============================================================================
--- freeswitch/branches/jkr888/trunk/src/mod/languages/mod_python/freeswitch_python.h (original)
+++ freeswitch/branches/jkr888/trunk/src/mod/languages/mod_python/freeswitch_python.h Fri Dec 8 09:59:16 2006
@@ -6,7 +6,7 @@
#include <switch.h>
-void *globalDTMFCallBackFunction = NULL;
+extern void *globalDTMFCallBackFunction = NULL;
extern switch_status_t PythonDTMFCallback(switch_core_session *session,
void *input,
switch_input_type_t itype,
Modified: freeswitch/branches/jkr888/trunk/src/mod/languages/mod_python/mod_python.i
==============================================================================
--- freeswitch/branches/jkr888/trunk/src/mod/languages/mod_python/mod_python.i (original)
+++ freeswitch/branches/jkr888/trunk/src/mod/languages/mod_python/mod_python.i Fri Dec 8 09:59:16 2006
@@ -15,14 +15,14 @@
{
PyObject *func, *arglist;
PyObject *result;
- int dres = 0;
+ switch_status_t dres = SWITCH_STATUS_FALSE;
func = (PyObject *) globalDTMFCallBackFunction; // Get Python function
arglist = Py_BuildValue("(sisi)",input,itype,buf,buflen); // Build argument list
result = PyEval_CallObject(func,arglist); // Call Python
Py_DECREF(arglist); // Trash arglist
if (result) { // If no errors, return double
- dres = PyInt_AsLong(result);
+ dres = (switch_status_t) PyInt_AsLong(result);
}
Py_XDECREF(result);
return dres;
Modified: freeswitch/branches/jkr888/trunk/src/mod/languages/mod_python/mod_python_wrap.cpp
==============================================================================
--- freeswitch/branches/jkr888/trunk/src/mod/languages/mod_python/mod_python_wrap.cpp (original)
+++ freeswitch/branches/jkr888/trunk/src/mod/languages/mod_python/mod_python_wrap.cpp Fri Dec 8 09:59:16 2006
@@ -1613,14 +1613,14 @@
{
PyObject *func, *arglist;
PyObject *result;
- int dres = 0;
+ switch_status_t dres = SWITCH_STATUS_FALSE;
func = (PyObject *) globalDTMFCallBackFunction; // Get Python function
arglist = Py_BuildValue("(sisi)",input,itype,buf,buflen); // Build argument list
result = PyEval_CallObject(func,arglist); // Call Python
Py_DECREF(arglist); // Trash arglist
if (result) { // If no errors, return double
- dres = PyInt_AsLong(result);
+ dres = (switch_status_t) PyInt_AsLong(result);
}
Py_XDECREF(result);
return dres;
More information about the Freeswitch-svn
mailing list