Skip to content

Commit 3ae4c39

Browse files
mtasakajeremyevans
authored andcommitted
Fix function prototype in tkutil.c
Fix funciton prototype for * tkstr_invalid_numstr (argument for rb_rescue2) * tkstr_rescue_float (argument for rb_rescue2) * tkstr_to_str (argument for rb_rescue2) * subst_mark (for struct rb_data_type_t) * subst_free (for struct rb_data_type_t) * subst_memsize (for struct rb_data_type_t)
1 parent 264a6f3 commit 3ae4c39

File tree

1 file changed

+10
-7
lines changed

1 file changed

+10
-7
lines changed

ext/tk/tkutil/tkutil.c

Lines changed: 10 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1000,15 +1000,15 @@ tkstr_to_float(VALUE value)
10001000
}
10011001

10021002
static VALUE
1003-
tkstr_invalid_numstr(VALUE value)
1003+
tkstr_invalid_numstr(VALUE value, VALUE unused)
10041004
{
10051005
rb_raise(rb_eArgError,
10061006
"invalid value for Number: '%s'", RSTRING_PTR(value));
10071007
return Qnil; /*dummy*/
10081008
}
10091009

10101010
static VALUE
1011-
tkstr_rescue_float(VALUE value)
1011+
tkstr_rescue_float(VALUE value, VALUE unused)
10121012
{
10131013
return rb_rescue2(tkstr_to_float, value,
10141014
tkstr_invalid_numstr, value,
@@ -1034,7 +1034,7 @@ tcl2rb_number(VALUE self, VALUE value)
10341034
}
10351035

10361036
static VALUE
1037-
tkstr_to_str(VALUE value)
1037+
tkstr_to_str(VALUE value, VALUE unused)
10381038
{
10391039
char * ptr;
10401040
long len;
@@ -1055,7 +1055,7 @@ tcl2rb_string(VALUE self, VALUE value)
10551055

10561056
if (RSTRING_PTR(value) == (char*)NULL) return rb_str_new2("");
10571057

1058-
return tkstr_to_str(value);
1058+
return tkstr_to_str(value, Qnil);
10591059
}
10601060

10611061
static VALUE
@@ -1095,16 +1095,18 @@ struct cbsubst_info {
10951095
};
10961096

10971097
static void
1098-
subst_mark(struct cbsubst_info *ptr)
1098+
subst_mark(void *arg)
10991099
{
1100+
struct cbsubst_info *ptr = (struct cbsubst_info *)arg;
11001101
rb_gc_mark(ptr->proc);
11011102
rb_gc_mark(ptr->aliases);
11021103
}
11031104

11041105
static void
1105-
subst_free(struct cbsubst_info *ptr)
1106+
subst_free(void *arg)
11061107
{
11071108
int i;
1109+
struct cbsubst_info *ptr = (struct cbsubst_info *)arg;
11081110

11091111
if (ptr) {
11101112
for(i = 0; i < CBSUBST_TBL_MAX; i++) {
@@ -1118,8 +1120,9 @@ subst_free(struct cbsubst_info *ptr)
11181120
}
11191121

11201122
static size_t
1121-
subst_memsize(const struct cbsubst_info *ptr)
1123+
subst_memsize(const void *arg)
11221124
{
1125+
struct cbsubst_info *ptr = (struct cbsubst_info *)arg;
11231126
return sizeof(*ptr);
11241127
}
11251128

0 commit comments

Comments
 (0)