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

Date: 2011-05-05 02:51 pm (UTC)
From: [identity profile] dimatorm.livejournal.com
божымой.
портит стэк.
какое аднака дерьмище аднака этот "гыгы язык"

Date: 2011-05-06 12:58 am (UTC)
From: [identity profile] sab123.livejournal.com
Дык, если не следовать последовательности вызова, конечно стек попортится. Гм, а это вообще живой человек?

July 2025

S M T W T F S
  1 2345
678 9101112
131415 1617 1819
202122 23 24 2526
2728293031  

Most Popular Tags

Style Credit

Expand Cut Tags

No cut tags
Page generated Jul. 28th, 2025 07:00 am
Powered by Dreamwidth Studios