-----BEGIN PGP SIGNED MESSAGE-----

Moin,

On Monday 19 January 2004 10:15, Nick Ing-Simmons wrote:
> Tels <[EMAIL PROTECTED]> writes:
> As I have said (at least twice recently) you can naturally do one of two
> things:

I am sorry, but I am new to perl-xs, discovered it only recently and reading 
the entire archive was too much for my brain. Also, all this XV things get 
hazy after a few hours of coding..

Thanx for the advise,

Tels

> 1. Get perl to Newz() you a struct in the PV
>    e.g.
>    SV *thing = newSV(sizeof(struct BigInt));

newSV?

>    struct BigInt *p = (struct BigInt *) SvPVX(sv);
>
> I usually add:
>    SvPOK_only(sv);
>    SvREADONLY_on(sv);
>
> OR
>
> 2. malloc() struct and put it in the IV
>    e.g.
>    struct BigInt *p = (struct BigInt *) malloc(sizeof(struct BitInt));
>    SV *thing = newSViv(PTR2IV(p));
>
> DO NOT malloc() and put in PV slot.

Ok, but why not? (curious :)

Cheers,

Tels

- -- 
 Signed on Mon Jan 19 18:38:27 2004 with key 0x93B84C15.
 Visit my photo gallery at http://bloodgate.com/photos/
 PGP key on http://bloodgate.com/tels.asc or per email.

 "Für eine solche Bitratenreduktion muss ich den Transcoder so
 umkonfigurieren, dass er gröbere Quantisierungskoeffizienten für die
 MPEG-Matrizen verwendet, Captain" - "An die Arbeit, Mr. LaForge." -- Jens
 Baumeister in http://tinyurl.com/oomb

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.2-rc1-SuSE (GNU/Linux)
Comment: When cryptography is outlawed, bayl bhgynjf jvyy unir cevinpl.

iQEVAwUBQAwWb3cLPEOTuEwVAQFUSAf+PrY9wDqDVfre6u2c8PSIenP5TM0SQ1dR
1lAfW92xurx1k2M//Dr7W7EvYmPXYhuNsE7PuR/xRktJKozuKzZffg+C0IfVn0XS
5UuOoTC54/VXYQqp9VceNLjGENRwxzUxkcvJpa9Rhhcf1LVli59O0wME9qdwqXPI
gw+VTLuIw30M0s7gNQ67ATaxMNoFClrkjJI+S6Yr3tbZjGuDQSqDZjatCUqjV2Xu
EwZHYXj8HoVHRKYJwaL/EzpLBLqYcd9VRlVwOhLchukLKlXlLaCyZ9j79HmLvqxz
OcacFI3aglbJ/m3nAwCtASNhNHWwZM7XuH4CmKXP17bwPJRBtljnAQ==
=uqTF
-----END PGP SIGNATURE-----

Reply via email to