Hi, everyone!
I'm trying to make some wrapper, but found something that I don't really understand. This is the test code:
This is the XS partThis is the perl part:#include "EXTERN.h" #include "perl.h" #include "XSUB.h" #include "ppport.h" MODULE = xstest PACKAGE = xstest SV* new() CODE: HV* hv = newHV(); RETVAL = newSVrv((SV*)hv, NULL); OUTPUT: RETVAL
#!/usr/bin/perl use common::sense; use xstest; my $obj = xstest::new(); say "object is: $obj";
In reply to SV creation inside XS by llancet
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |