May. 4th, 2011

sab123: (Default)
Прошлый рецепт про комбинацию модулей в 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;

May 2026

S M T W T F S
      12
34 5 6 7 89
1011121314 1516
171819 20 212223
24 25 2627282930
31      

Most Popular Tags

Style Credit

Expand Cut Tags

No cut tags
Page generated Jun. 1st, 2026 02:13 am
Powered by Dreamwidth Studios