Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

[perl #29261] [PATCH Wrap Out Parameters in PMCs]

8 views
Skip to first unread message

Chromatic

unread,
Apr 29, 2004, 10:49:48 PM4/29/04
to bugs-bi...@rt.perl.org
# New Ticket Created by chromatic
# Please include the string: [perl #29261]
# in the subject line of all future correspondence about this issue.
# <URL: http://rt.perl.org:80/rt3/Ticket/Display.html?id=29261 >


Following up on the idea Leo and I discussed this morning, here's a
patch that expects integer out parameters to be wrapped in some sort of
INTVALy PMCs.

This solves my problem rather nicely.

One test in t/pmc/nci.t needed patching and I added a test.

If this is acceptable, we should do the same for float and string out
parameters too.

Please note that this only affects integers passed to NCI subs via
pointers.

-- c


wrap_int_pointers.patch

Leopold Toetsch

unread,
Apr 30, 2004, 1:44:36 AM4/30/04
to perl6-i...@perl.org
Chromatic <bugs-...@netlabs.develooper.com> wrote:

> Following up on the idea Leo and I discussed this morning, here's a
> patch that expects integer out parameters to be wrapped in some sort of
> INTVALy PMCs.

> This solves my problem rather nicely.

Good. As soon as we have Dan's ok and I'll have JIT adapted too, it'll
go in.

leo

Dan Sugalski

unread,
Apr 30, 2004, 8:48:54 AM4/30/04
to l...@toetsch.at, perl6-i...@perl.org

Works for me. I was going to have you guys work out what you need and
put it in, but you've beaten me to it. :)

If it alters the way things look to bytecode, just make sure to
update the docs and patch up the existing wrapping libraries.
--
Dan

--------------------------------------"it's like this"-------------------
Dan Sugalski even samurai
d...@sidhe.org have teddy bears and even
teddy bears get drunk

Leopold Toetsch

unread,
Apr 30, 2004, 12:01:48 PM4/30/04
to Dan Sugalski, perl6-i...@perl.org
Dan Sugalski <d...@sidhe.org> wrote:

> If it alters the way things look to bytecode, just make sure to
> update the docs and patch up the existing wrapping libraries.

Docs are adapted. Needed code changes:

old for signature "i3i":

I5 = arg1
I6 = arg2

new

new P5, .PerlInt
P5 = arg1
I5 = arg2

leo

Leopold Toetsch

unread,
Apr 30, 2004, 12:05:40 PM4/30/04
to perl6-i...@perl.org
Chromatic <bugs-...@netlabs.develooper.com> wrote:

> Following up on the idea Leo and I discussed this morning, here's a
> patch that expects integer out parameters to be wrapped in some sort of
> INTVALy PMCs.

Thanks, applied + changed '2' and '4' too + JIT/i386.
leo

Chromatic

unread,
Apr 30, 2004, 12:49:02 PM4/30/04
to Dan Sugalski, perl6-i...@perl.org
On Fri, 2004-04-30 at 05:48, Dan Sugalski wrote:

> If it alters the way things look to bytecode, just make sure to
> update the docs and patch up the existing wrapping libraries.

I'll take a look at Leo's new docs and patch everything with an
offending signature in src/call_list.txt.

Anyone who has NCI libraries that pass pointers to primitives, drop me a
note and I'll help you fix them.

-- c

0 new messages