X-Git-Url: http://git.annexia.org/?a=blobdiff_plain;f=perl_c.c;h=7f3bdddd7f17f31a81ab6b823c41ec66e0ef5ac9;hb=7ff8ec09f0edb4a9048d7da8d63ee882bdfd97d2;hp=897e174db8f404a2d6eb73a369743544bc7f8cb8;hpb=5e86bfad5637289608ed35b439bb5247f96e8453;p=perl4caml.git diff --git a/perl_c.c b/perl_c.c index 897e174..7f3bddd 100644 --- a/perl_c.c +++ b/perl_c.c @@ -1,6 +1,6 @@ /* Interface to Perl from OCaml. * Copyright (C) 2003 Merjis Ltd. - * $Id: perl_c.c,v 1.9 2003-10-26 11:22:38 rich Exp $ + * $Id: perl_c.c,v 1.11 2003-10-26 12:57:11 rich Exp $ */ #include @@ -191,14 +191,6 @@ perl4caml_sv_is_true (value svv) } CAMLprim value -perl4caml_sv_is_undef (value svv) -{ - CAMLparam1 (svv); - SV *sv = Sv_val (svv); - CAMLreturn (SvLEN (sv) == 0 ? Val_true : Val_false); -} - -CAMLprim value perl4caml_sv_undef (value unit) { CAMLparam1 (unit); @@ -755,7 +747,7 @@ perl4caml_call_void (value optsv, value optfnname, value arglist) else if (optfnname != Val_int (0)) { fnname = unoption (optfnname, Val_false); - count = call_pv (String_val (fnname), G_EVAL|G_VOID); + count = call_pv (String_val (fnname), G_EVAL|G_VOID|G_DISCARD); } else { @@ -766,7 +758,7 @@ perl4caml_call_void (value optsv, value optfnname, value arglist) SPAGAIN; - assert (count == 0); /* Pretty sure it should never be anything else. */ + assert (count == 0); /* Restore the stack. */ PUTBACK; @@ -923,11 +915,11 @@ perl4caml_call_method_void (value ref, value name, value arglist) PUTBACK; - count = call_method (String_val (name), G_EVAL|G_VOID); + count = call_method (String_val (name), G_EVAL|G_VOID|G_DISCARD); SPAGAIN; - assert (count == 0); /* Pretty sure it should never be anything else. */ + assert (count == 0); /* Restore the stack. */ PUTBACK; @@ -1065,11 +1057,11 @@ perl4caml_call_class_method_void (value classname, value name, value arglist) PUTBACK; - count = call_method (String_val (name), G_EVAL|G_VOID); + count = call_method (String_val (name), G_EVAL|G_VOID|G_DISCARD); SPAGAIN; - assert (count == 0); /* Pretty sure it should never be anything else. */ + assert (count == 0); /* Restore the stack. */ PUTBACK;