Andy Lester wrote:
>On Mon, Dec 05, 2005 at 11:33:01PM +0300, Vadim Konovalov ([email protected: v...@vkonovalov.ru]) wrote:
>
>
>>but then you do not get rid of pTHX at declarations of functions:
>>
>> STATIC void
>>-sequence(pTHX_ register const OP *o)
>>+S_sequence(pTHX_ register const OP *o)
>>
>>
>
>That's correct. The definition of the function still needs that pTHX or
>pTHX_.
>
>xoxo,
>Andy
>
>
>
I note that this embe-definition is only available in dump.c ..
@@ -1271,6 +1274,8 @@ Es |void |to_byte_substr |NN regexp * pr
#if defined(PERL_IN_DUMP_C) || defined(PERL_DECL_PROT)
s |CV* |deb_curcv |I32 ix
s |void |debprof |NN const OP *o
+s |void |sequence |NULLOK const OP *o
+s |UV |sequence_num |NULLOK const OP *o
#endif
Is this *the way* to share small bits of interface between
parts of core ?
In this case, the 'sharing' is pretty limited,
essentially an automatic/neatly-tucked-away macro definition thats
only available in the same file as the function being adapted.
Im looking for the right way of exposing, say,
union arena* get_arena(pTHX);
from sv.c, where its (to be) implemented, to hv.c, where it
would get used by S_more_he()
where
union arena {
double alignthis;
char data[PERL_MEM_SIZE];
};
would be defd in sv.c, and 'opaque' to hv.c,
but treated like the block of mem it is (ie carved into HEs).
NB. code above exists, but gets weird failures on some Smoke configs.
thx
jimc