[svn:parrot] r38276 - trunk/src/pmc
Infinoid at svn.parrot.org
Infinoid at svn.parrot.org
Wed Apr 22 20:43:02 UTC 2009
Author: Infinoid
Date: Wed Apr 22 20:43:02 2009
New Revision: 38276
URL: https://trac.parrot.org/parrot/changeset/38276
Log:
[netbsd] netbsd-alpha fails to compile due to passing NULL in place of a va_list argument.
va_list is not always a pointer type, this is not a requirement of C89.
This patch implements allison++'s suggestion to more cleanly build a null CallSignature object.
Modified:
trunk/src/pmc/class.pmc
Modified: trunk/src/pmc/class.pmc
==============================================================================
--- trunk/src/pmc/class.pmc Wed Apr 22 20:06:30 2009 (r38275)
+++ trunk/src/pmc/class.pmc Wed Apr 22 20:43:02 2009 (r38276)
@@ -335,7 +335,11 @@
meth = Parrot_oo_find_vtable_override_for_class(interp, parent, name);
if (!PMC_IS_NULL(meth)) {
- PMC *sig_obj = Parrot_pcc_build_sig_object_from_varargs(interp, object, "->", NULL);
+ /* build an empty signature; it has an invocant but no args/retvals */
+ PMC *sig_obj = pmc_new(interp, enum_class_CallSignature);
+ VTABLE_set_string_native(interp, sig_obj, CONST_STRING(interp, "Pi->"));
+ /* add the invocant */
+ VTABLE_unshift_pmc(interp, sig_obj, object);
Parrot_pcc_invoke_from_sig_object(interp, meth, sig_obj);
gc_unregister_pmc(interp, sig_obj);
}
More information about the parrot-commits
mailing list