Right now the generated code produces a lot of calls like:
gh_new_procedure("material-grids-approx-gradient-aux", (SCM(*) ()) material_grids_approx_gradient_aux, 4, 0, 0);
where SCM(*) () was the old (pre-1.0) type of this argument, changed to void * in guile 2.0 by cky/guile@be90d0b … on modern C compilers, this old-style C declaration is deprecated and can yield compiler warnings.
Note that gh_new_procedure itself was replaced by scm_c_define_gsubr a long time ago, which was worked around with a #define for backwards compatibility here:
|
#define gh_new_procedure(name, fcn, req, opt, rst) \ |
|
scm_c_define_gsubr(name, req, opt, rst, (scm_t_subr)(fcn)) |
|
#else |
|
#define gh_new_procedure(name, fcn, req, opt, rst) scm_c_define_gsubr(name, req, opt, rst, fcn) |
Probably we should just drop guile < 2.0 soon — guile 2.0 was released in 2011.
However, in the meantime we should spit out a (scm_t_subr) cast instead of (SCM(*) ()), and have a backward-compatibility typedef SCM (* scm_t_subr) (); here:
|
#define gh_new_procedure(name, fcn, req, opt, rst) scm_c_define_gsubr(name, req, opt, rst, fcn) |
Right now the generated code produces a lot of calls like:
where
SCM(*) ()was the old (pre-1.0) type of this argument, changed tovoid *in guile 2.0 by cky/guile@be90d0b … on modern C compilers, this old-style C declaration is deprecated and can yield compiler warnings.Note that
gh_new_procedureitself was replaced byscm_c_define_gsubra long time ago, which was worked around with a#definefor backwards compatibility here:libctl/src/ctl.h.in
Lines 98 to 101 in 5a8155b
Probably we should just drop guile < 2.0 soon — guile 2.0 was released in 2011.
However, in the meantime we should spit out a
(scm_t_subr)cast instead of(SCM(*) ()), and have a backward-compatibilitytypedef SCM (* scm_t_subr) ();here:libctl/src/ctl.h.in
Line 101 in 5a8155b