in reply to Module::Build::WithXSpp does not correctly handle XS files correctly?

After tried XSPP, I found it lack some important functions such as "PPCODE", so I decided to write XS code by my hand.

http://search.cpan.org/grep?cpanid=MDOOTSON&release=Wx-0.9922&string=PPCODE&i=1&n=1&C=6

69-void 70-wxConfigBase::GetFirstEntry() 71- PREINIT: 72- wxString name; 73- long index; 74- bool ret; 75: PPCODE: 76- ret = THIS->GetFirstEntry( name, index ); 77- EXTEND( SP, 3 ); 78- PUSHs( sv_2mortal( newSViv( ret ) ) ); 79- SV* tmp = newSViv( 0 ); 80- WXSTRING_OUTPUT( name, tmp ); 81- PUSHs( sv_2mortal( tmp ) );

... Though that, the Module::Build::WithXSpp is still very handful, ... how could this happen?

Its really hard to say, anything related to XS really needs the most (reproducibility and minimal test case )dness possible, for example use Inline CPP to call function in so file not working and SOso-0.01.patch.txt

  • Comment on Re: Module::Build::WithXSpp does not correctly handle XS files correctly?
  • Download Code

Replies are listed 'Best First'.
Re^2: Module::Build::WithXSpp does not correctly handle XS files correctly?
by llancet (Friar) on Jan 10, 2014 at 09:26 UTC
    First, to use PPCODE, Wx embeds pure XS in "{% %}". So why don't I write XS code directly?

    Second, Wx use ExtUtils::MakeMaker, but not M::B or M::B::WithXSpp.

      First, to use PPCODE, Wx embeds pure XS in "{% %}". So why don't I write XS code directly?

      Because xspp saves you typing because it is "thin" layer over xs?

      Second, Wx use ExtUtils::MakeMaker, but not M::B or M::B::WithXSpp.

      I don't see how this matters, both call INCLUDE_COMMAND...xspp... which works exactly the same way in both versions