Re: [OFFTOPIC] Re: External API's: XS, Pickle, Win32::API, FFI, C::DynaLib etc.

[email protected] (John Tobey) Tue, 1 Aug 2000 00:01:52 -0400 (EDT)
Newsgroups perl.bootstrap
Message-ID <[email protected]>
Jarkko Hietaniemi <[email protected]> wrote:
> On Mon, Jul 31, 2000 at 11:50:15PM -0400, John Tobey wrote:
> > This issue has little to do with Perl 6, or even Perl, per se.
> > 
> > Garrett Goebel <[email protected]> wrote:
> > > There's an awful lot of Win32 modules that depend on Win32::API
> > > to dynamically call functions from Win32 API *.dll's. There is
> > > pretty good evidence that there are Perl programmers out there
> > > that what to dynamically call C functions from libraries without
> > > writing XS glue code or requiring a C compiler.
> > 
> > Support for calling arbitrary C functions without a C compiler is
> > hard to implement and port.  GNU ffcall looks like a good,
> > portable implementation, for which FFI.pm is an attempt at a Perl
> > wrapper, but, as you pointed out, ffcall is under GPL.
> > 
> > Since this issue mainly affects Windows users (I assume),
> 
> You assume somewhat wrongly.  Large portions of Configure are doing
> exactly that: trying to figure out which particular variant (how many
> arguments and of which type) of a system/library call are we using
> today (and which particular combo of compiler flags, headers, and
> libraries, if we are using a compiler...)  I would consider doing
> rather naughty things in public if I could figure out those things
> cleanly.

That's a different problem.  Configure is trying to reverse engineer
header files.  Garrett already knows the prototype of his DLL function
he wants to call, but, unlike Configure, he doesn't have access to a C
compiler.

-- 
John Tobey, late nite hacker <[email protected]>
\\\                                                               ///
]]]             With enough bugs, all eyes are shallow.           [[[
///                                                               \\\