вот так правильно
May. 4th, 2011 08:29 pm![[personal profile]](https://www.dreamwidth.org/img/silk/identity/user.png)
Прошлый рецепт про комбинацию модулей в XS оказался кривым. Если boot_* вызывать просто так, то оно портит перловый стек. Правильно вызывать вот так, каждый раз форомируя стековый фрейм вокруг вызова:
#ifdef __cplusplus extern "C" { #endif XS(boot_Biceps__Label); XS(boot_Biceps__Row); #ifdef __cplusplus }; #endif BOOT: # boot sub-packages that are compiled separately PUSHMARK(SP); if (items >= 2) { XPUSHs(ST(0)); XPUSHs(ST(1)); } PUTBACK; boot_Biceps__Label(aTHX_ cv); SPAGAIN; POPs; // PUSHMARK(SP); if (items >= 2) { XPUSHs(ST(0)); XPUSHs(ST(1)); } PUTBACK; boot_Biceps__Row(aTHX_ cv); SPAGAIN; POPs;
no subject
Date: 2011-05-05 02:51 pm (UTC)портит стэк.
какое аднака дерьмище аднака этот "гыгы язык"
no subject
Date: 2011-05-06 12:58 am (UTC)