[I would suggest that we move this discussion to macperl-toolbox] In article <19990727185703Z91893-253+24@athena.chebucto.ns.ca>, Arved_37@chebucto.ns.ca writes: > If I may offer a few words of advice. You advice was very interesting to read, as it pointed out to me how badly I have really documented my techniques for interfacing. So here's an attempt to do so: >Copy and paste the WASTE public API > into a fresh file, and lay the functions out K&R C style, that is: The end result is correct, but I'd recommend strongly against that process. Instead, go to the directory :ext:Mac in your MacPerl source distribution and execute: :ExtUtils:MakeToolboxModule WASTE This creates a directory and the necessary skeletons to get you started. You will have to edit the path for the ExtractCalls and ExtractConstants lines to point to your real location for WASTE, then Execute the extractcalls line and paste the result into the XS file Execute the extractconstants line and past the result into the PM file Edit the files. Finally, executethe extractfunctions line and paste the results into the PM file. > Identify the arguments as IN, OUT, or INOUT (leave the IN's blank if you > like). OUT's and INOUT's will require special treatment - hopefully there > won't be too many of them. My philosophy for Toolbox API ports so far has been to have *NO* out parameters. No exceptions. I believe that out parameters fit badly into the perl design. > Identify all the complex datatypes that need to be accessed *from* Perl, > either for reading fields or setting fields. These have to be done in > more detail; Yes, using the ext/Mac/ExtUtils/ExtractFields script. >the others, that are still going to be passed around in Perl, > can be handled as "opaque" pointers. Yes. Matthias -- Matthias Neeracher <neeri@iis.ee.ethz.ch> http://www.iis.ee.ethz.ch/~neeri "And that's why I am going to turn this world upside down, and make of it a fire so *bright* that someone real will notice" -- Vernor Vinge, _Tatja Grimm's World_ ===== Want to unsubscribe from this list? ===== Send mail with body "unsubscribe" to macperl-request@macperl.org