Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix function parameters to support C23 #66

Merged
merged 1 commit into from
Jan 16, 2025
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
19 changes: 5 additions & 14 deletions ext/tk/tcltklib.c
Original file line number Diff line number Diff line change
Expand Up @@ -255,7 +255,7 @@ static ID ID_inspect;
static VALUE ip_invoke_real _((int, VALUE*, VALUE));
static VALUE ip_invoke _((int, VALUE*, VALUE));
static VALUE ip_invoke_with_position _((int, VALUE*, VALUE, Tcl_QueuePosition));
static VALUE tk_funcall _((VALUE(), int, VALUE*, VALUE));
static VALUE tk_funcall _((VALUE(*)(VALUE, int, VALUE *), int, VALUE*, VALUE));

/* Tcl's object type */
#if TCL_MAJOR_VERSION >= 8
Expand Down Expand Up @@ -436,7 +436,7 @@ struct eval_queue {

struct call_queue {
Tcl_Event ev;
VALUE (*func)();
VALUE (*func)(VALUE, int, VALUE *);
int argc;
VALUE *argv;
VALUE interp;
Expand Down Expand Up @@ -2017,12 +2017,7 @@ rbtk_EventCheckProc(ClientData clientData, int flag)

#ifdef RUBY_USE_NATIVE_THREAD /* Ruby 1.9+ !!! */
static VALUE
#ifdef HAVE_PROTOTYPES
call_DoOneEvent_core(VALUE flag_val)
#else
call_DoOneEvent_core(flag_val)
VALUE flag_val;
#endif
call_DoOneEvent_core(VALUE flag_val, RB_UNUSED_VAR(int argc), RB_UNUSED_VAR(VALUE *argv))
{
int flag;

Expand Down Expand Up @@ -3365,7 +3360,7 @@ tcl_protect_core(interp, proc, data) /* should not raise exception */
static int
tcl_protect(interp, proc, data)
Tcl_Interp *interp;
VALUE (*proc)();
VALUE (*proc)(VALUE);
VALUE data;
{
int code;
Expand Down Expand Up @@ -7039,11 +7034,7 @@ call_queue_handler(evPtr, flags)
}

static VALUE
tk_funcall(func, argc, argv, obj)
VALUE (*func)();
int argc;
VALUE *argv;
VALUE obj;
tk_funcall(VALUE (*func)(VALUE, int, VALUE *), int argc, VALUE *argv, VALUE obj)
{
struct call_queue *callq;
struct tcltkip *ptr;
Expand Down