Re: Perl bindings for libaosd: v0.01



Torsten Schoenfeld wrote:

Then you need to alter the constructor so it can be used as
X11::Aosd->new and just ignores the class name:

Aosd *
aosd_new(class)
    C_ARGS:
      /* void */

Then remove every method in Aosd.pm.

Is there a better way than building the Perl object on a scalar 
reference to Aosd*?

In typemap, you specify that T_PTROBJ is to be used for Aosd*.  That
means that whenever a Aosd* pointer is encountered, it automatically
gets wrapped as an opaque scalar.  So that should be fine.

This way I get a blessed AosdPtr SCALAR ref and Perl can't find any of 
the binded methods in the AosdPtr package (hmm, is this namespace 
pollution acceptable?) - only new() and DESTROY() work as expected now 
;)

Obviously I'm missing something. X11/Aosd.pm is more or less empty 
(besides XSLoader, AUTOLOADER and constants stuff) and I added the 
PREFIX to the MODULE line.

Thanks,

Jörn

-- 
$a=$a[8][67][9][0][42][214][82][78][0][50][69][68][69][82][0][73][78][0]
[65][0][20][16][0][68][73][77][69][78][83][73][79][78][65][76][0][65][82
][82][65][89]=sub{sub _($){print$_[ z]}($z,$i)= _;(++$i)while!$z->[$i];$
s+=$i;_ chr($i+32);$s!=2292&&&$a($z->[$i],$c>>$e)};&$a(\ a,$d<<$f);_"\n"

Attachment: pgpCte10R2e5R.pgp
Description: PGP signature



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]