llancet has asked for the wisdom of the Perl Monks concerning the following question:
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";
|
---|
Replies are listed 'Best First'. | |
---|---|
Re: SV creation inside XS
by BrowserUk (Patriarch) on Nov 06, 2011 at 17:30 UTC | |
by llancet (Friar) on Nov 07, 2011 at 01:01 UTC | |
by BrowserUk (Patriarch) on Nov 07, 2011 at 01:12 UTC | |
by llancet (Friar) on Nov 09, 2011 at 01:53 UTC | |
by BrowserUk (Patriarch) on Nov 09, 2011 at 03:41 UTC | |
| |
by ikegami (Patriarch) on Nov 09, 2011 at 06:09 UTC | |
by ikegami (Patriarch) on Nov 07, 2011 at 02:22 UTC | |
Re: SV creation inside XS
by dave_the_m (Monsignor) on Nov 06, 2011 at 17:13 UTC | |
Re: SV creation inside XS
by patcat88 (Deacon) on Nov 07, 2011 at 01:45 UTC |
Back to
Seekers of Perl Wisdom