[svn:parrot] r48718 - trunk/src/pmc
chromatic at svn.parrot.org
chromatic at svn.parrot.org
Sun Aug 29 02:05:11 UTC 2010
Author: chromatic
Date: Sun Aug 29 02:05:11 2010
New Revision: 48718
URL: https://trac.parrot.org/parrot/changeset/48718
Log:
[PMC] Simplified type check in MultiSub's push_pmc.
Modified:
trunk/src/pmc/multisub.pmc
Modified: trunk/src/pmc/multisub.pmc
==============================================================================
--- trunk/src/pmc/multisub.pmc Sun Aug 29 02:05:08 2010 (r48717)
+++ trunk/src/pmc/multisub.pmc Sun Aug 29 02:05:11 2010 (r48718)
@@ -34,13 +34,9 @@
}
VTABLE void push_pmc(PMC *value) {
- STRING * const _sub = CONST_STRING(INTERP, "Sub");
- STRING * const _nci = CONST_STRING(INTERP, "NCI");
-
- if (!VTABLE_isa(INTERP, value, _sub)
- && !VTABLE_isa(INTERP, value, _nci))
- Parrot_ex_throw_from_c_args(INTERP, NULL, EXCEPTION_INVALID_OPERATION,
- "attempt to push non Sub PMC");
+ if (!VTABLE_does(INTERP, value, CONST_STRING(INTERP, "invokable")))
+ Parrot_ex_throw_from_c_args(INTERP, NULL,
+ EXCEPTION_INVALID_OPERATION, "attempt to push non Sub PMC");
SUPER(value);
}
More information about the parrot-commits
mailing list