From: rich Date: Sun, 26 Oct 2003 12:10:23 +0000 (+0000) Subject: All _void methods now add G_DISCARD flag. X-Git-Url: http://git.annexia.org/?a=commitdiff_plain;h=432e85196383810d7f6d4e695c758a8d17b96f2b;hp=5e86bfad5637289608ed35b439bb5247f96e8453;p=perl4caml.git All _void methods now add G_DISCARD flag. --- diff --git a/perl_c.c b/perl_c.c index 897e174..29c9776 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.10 2003-10-26 12:10:23 rich Exp $ */ #include @@ -755,7 +755,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 +766,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 +923,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 +1065,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;