diff --git a/src/expr.c b/src/expr.c index 27c7f36..dfc2bde 100644 --- a/src/expr.c +++ b/src/expr.c @@ -974,7 +974,7 @@ static Value *function_switch(const ExprFunc *func, int n, const char *parent) #ifdef TFPYTHON case FN_python: { - struct Value *rv = handle_python_function( opdstr(n-0) ); + struct Value *rv = handle_python_function( opdstr(n-0), 0 ); if( !rv ) { return shareval(val_zero); } else { diff --git a/src/tfpython.c b/src/tfpython.c index a1fbfe2..5f7d498 100644 --- a/src/tfpython.c +++ b/src/tfpython.c @@ -201,7 +201,7 @@ static struct Value* pyvar_to_tfvar( PyObject *pRc ) { struct Value *rc; char *cstr; - int len; // Py_ssize_t len; + long int len; // Py_ssize_t len; // can be null if exception was thrown if( !pRc ) { @@ -466,7 +466,7 @@ struct Value *handle_python_command( String *args, int offset ) return pyvar_to_tfvar( pRc ); } -struct Value *handle_python_function( conString *args ) +struct Value *handle_python_function( conString *args, int offset ) { PyObject *pRc; diff --git a/src/tfpython.h b/src/tfpython.h index 2549724..9593732 100644 --- a/src/tfpython.h +++ b/src/tfpython.h @@ -23,7 +23,7 @@ #include "signals.h" /* suspend(), shell() */ #include "variable.h" -struct Value *handle_python_function( conString *args ); +struct Value *handle_python_function( conString *args, int offset ); struct Value *handle_python_command( String *args, int offset ); struct Value *handle_python_kill_command( String *args, int offset ); struct Value *handle_python_call_command( String *args, int offset );