. .


Calling Foreign Functions from Gemstone

March 16, 2011 13:04:01.934

I missed the first 10 minutes or so of Martin McClure's talk - I suddenly developed a cough, and it looked like I was going to disturb his talk. So, I grabbed coffee while he started doing his demo. Here's Martin:

His first demo showed the way they used to do things (largely by hand), which worked, but was tedious. Now he's showing the newer, less ad-hoc code. It looks like they can parse a standard C header file, and extract out the available functions and create a wrapper class (an awful lot like DLLCC, but he's doing it from a workspace as opposed to a tool). One nice thing - you can filter to limit the plethora of things such a thing might try to wrap if you just let it go on its own.

What comes out of that is a wrapper class with a ton of Class Variables, each of which represents an interface to one of the generated functions. Absent the pragmas, the methods that get generated look a lot like what DLLCC generates in VW. One nice thing - the wrapper includes the segment of the header file that became the interface in question, so you can see how you ended up where you are. That makes it a bit easier to hack on things that it doesn't get quite right.

And of course, you can download their 64 bit work and try this stuff yourself.

Technorati Tags: , ,

posted by James Robertson

 Share Tweet This