Slash Boxes
NOTE: use Perl; is on undef hiatus. You can read content, but you can't post it. More info will be forthcoming forthcomingly.

All the Perl that's Practical to Extract and Report

use Perl Log In

Log In

[ Create a new account ]

Elian (119)

  (email not shown publicly)
AOL IM: DanSugalski (Add Buddy, Send Message)

Perl 6/Parrot internals ex-design team lead.

Journal of Elian (119)

Monday November 25, 2002
10:21 PM

Native Call Interface for Parrot

[ #9147 ]

Well, the infrastructure, API, and protocols are in. Parrot can now automatically wrap most any C library, generating shims that look like regular parrot subs to parrot, but call into the library for you. Which means that, if you've set things up right, you can do:

    loadlib P1, "sdl"
    dlfunc P0, P1, "SDL_Init", "ii"
    set I5, 255
    unless I5, OK
    hcf "SDL_Init failed!"
    print "SDL_Init worked just fine"

Well, OK, except for the hcf part, since exceptions aren't in yet. Soon, though...

The Fine Print: The following comments are owned by whoever posted them. We are not responsible for them in any way.
More | Login | Reply
Loading... please wait.
  • Not Schwern, Schwing! How long before Intrepid Leader Dan has the Objective CParrot bridge running and we can write our Mac GUI apps in Parrot assembly language? :-)


    • Heh. Might be a while. Shoudn't be a problem to subclass a Parrot object from Objective-C, or vice versa, though.