[Jifty-commit] r5378 - Runops-Hook/trunk
Jifty commits
jifty-commit at lists.jifty.org
Wed May 7 06:49:33 EDT 2008
Author: nothingmuch
Date: Wed May 7 06:49:33 2008
New Revision: 5378
Modified:
Runops-Hook/trunk/Hook.xs
Log:
comments ftw
Modified: Runops-Hook/trunk/Hook.xs
==============================================================================
--- Runops-Hook/trunk/Hook.xs (original)
+++ Runops-Hook/trunk/Hook.xs Wed May 7 06:49:33 2008
@@ -78,13 +78,18 @@
SV *
Runops_Hook_op_to_BOP (pTHX_ OP *op) {
dSP;
+ /* this assumes Runops_Hook_load_B() has already been called */
+
+ /* we fake B::UNOP object (fakeop_sv) that points to our static fakeop.
+ * then we set first_op to the op we want to make an object out of, and
+ * trampoline into B::UNOP->first so that it creates the B::OP of the
+ * correct class for us.
+ * B should really have a way to create an op from a pointer via some
+ * external API. This sucks monkey balls on olympic levels */
- /* fake a B::UNOP that we use as a trampoline to make a B::OP object out of PL_op */
- /* fakeop_sv is created in load_B based on the static struct fakeop's addr */
Runops_Hook_fakeop.op_first = op;
PUSHMARK(SP);
- /* create the blessed object out of fakeop, and call B::UNOP::first on it */
XPUSHs(Runops_Hook_fakeop_sv);
PUTBACK;
More information about the Jifty-commit
mailing list