Skip Menu |

This queue is for tickets about the B-OPCheck CPAN distribution.

Report information
The Basics
Id: 120487
Status: open
Priority: 0/
Queue: B-OPCheck

People
Owner: Nobody in particular
Requestors: KES [...] cpan.org
Cc:
AdminCc:

Bug Information
Severity: (no value)
Broken in: (no value)
Fixed in: (no value)



Subject: Proposal to improve code
You have next comment at xs Show quoted text
>This is from Runops::Hook. We need to find a way to share c functions
... Show quoted text
>
/* 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 */ But now we may use call to make_op_object which will create SV from OP From B.xs static SV * make_op_object(pTHX_ const OP *o) { SV *opsv = sv_newmortal(); sv_setiv(newSVrv(opsv, opclassnames[cc_opclass(aTHX_ o)]), PTR2IV(o)); return opsv; }
Subject: Re: [rt.cpan.org #120487] Proposal to improve code
Date: Sun, 5 Mar 2017 19:17:12 +0000
To: bug-B-OPCheck [...] rt.cpan.org
From: Yuval Kogman <nothingmuch [...] woobling.org>
Hi, I'm way out of touch with Perl, especailly internals.... Would you like to take over this module? It'd be nice to see my tasteless comments and code removed =)
RT-Send-CC: nothingmuch [...] woobling.org
On 2017-03-03 07:39:24, KES wrote: Show quoted text
> You have next comment at xs
... Show quoted text
> But now we may use call to make_op_object which will create SV from OP > From B.xs
Please feel free to submit a pull request!