Billy Patton <[EMAIL PROTECTED]> writes:
>How di I export a "c" global variable into perl??
>
>In c I have
>int XYZ = 0;
>
>How do I get this into perl WO having to write a function.

You don't.

>
>EXPORT  qw ( XYZ );

Presumably you mean 

@EXPORT = qw($XYZ);

How you map that depends on whether you want C side changes to the global 
to magically update the perl variable or if it is really a constant.
If you want C changes to apear in perl you need to use tie (or "magic"
in mg.h sense) to cause perl to look at C variable every time - this is 
messy.

If it really a "constant" then it is best to #define a "function":

#define ACCESS_XYZ() XYW

and 

MODULE ... PREFIX = ACCESS_

int 
ACCESS_XYX()


>
>THis seems to be missing something.
-- 
Nick Ing-Simmons
http://www.ni-s.u-net.com/

Reply via email to