Native Call Interface for Parrot

Elian on 2002-11-26T03:21:19

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...


Schwing!

gnat on 2002-11-26T04:32:19

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

Re:Schwing!

Elian on 2002-11-26T05:22:56

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