Without testing it and actually going from the perlapi documentation for Newxz, the following should give you an allocated buffer, filled with zeroes:
AirLorconDriver * l_packet; Newxz( l_packet, 1, AirLorconDriver); /* Remember to use SafeFree() to release the memory pointed to by l_pa +cket */
Update: Also see perlguts for more discussion of Newx() and friends
In reply to Re: help with XS (Newx and
by Corion
in thread help with XS (Newx and
by Bpl
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |