Stories
Slash Boxes
Comments
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)

Elian
  (email not shown publicly)
http://www.sidhe.org/~dan/
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
    invoke
    unless I5, OK
    hcf "SDL_Init failed!"
  OK:
    print "SDL_Init worked just fine"
    exit

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.
 Full
 Abbreviated
 Hidden
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? :-)

    --Nat

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