Skip to content

Commit

Permalink
Fixes for GCC-14. handle_python_function defined with only one argume…
Browse files Browse the repository at this point in the history
…nt, struct Value has two in command.h. Gave default of 0 to second argument in call from expr.c. Change from int to long int in pyvar_to_tfvar.
  • Loading branch information
fierlo committed Oct 20, 2024
1 parent c7fa593 commit b376331
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion src/expr.c
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand Down
4 changes: 2 additions & 2 deletions src/tfpython.c
Original file line number Diff line number Diff line change
Expand Up @@ -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 ) {
Expand Down Expand Up @@ -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;

Expand Down
2 changes: 1 addition & 1 deletion src/tfpython.h
Original file line number Diff line number Diff line change
Expand Up @@ -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 );
Expand Down

0 comments on commit b376331

Please sign in to comment.