Tholom Kiely wrote:
> 
> Hello Brian,
> 
> I've just been trying out Inline -- looks great! I found it while looking around for 
>alternatives to SWIG, and hope it will be easier to access global variables from 
>imported libraries/shared objects.
> 
> Of course, a library shouldn't have these, but I'm using code developed by an Elec 
>Eng. like myself, code which is big and very sinful in S/W Eng terms :)
> 
> I have some zany ideas about managing complex data types in C by (semi-)automating a 
>translation process based on c2ph output.
> 
> For example, I'd could conceivably import a 'struct' variable into a hash,
> where each key/value pair contains a pointer to the data, the key being the struct 
>member name, perhaps even mangled with some information about the size/type of the 
>object pointed to.
> 
> I think interface generator gurus haven't tried implementing this fully, being 
>hampered by a lack of ignorance of the difficulties involved...:)
> 
> Can you tell me if you've considered ways of importing variables? I'd very much 
>appreciate any comments/suggestions you'd have on this.

I think what you want is the functionality of Inline::Struct (which
isn't available yet). This is a new module that Neil Watkiss and I are
working on. It should do all the things you talked about and more. See
http://www.mail-archive.com/inline@perl.org/msg00247.html

Look for this functionality in a few weeks.

Brian

-- 
perl -le 'use Inline C=>q{SV*JAxH(char*x){return newSVpvf
("Just Another %s Hacker",x);}};print JAxH+Perl'

Reply via email to