Steve Peters via RT wrote: >>[jimc - Sun Jul 13 22:36:22 2003]: >> >>When doing 'make test' on B::Generate on 5.8.1-19893, >>I get missing symbols, which are defined in embed.h, >>and used successfully in core. For me at least, theyre >>not available to this XS module (though other non-CORE >>XS's build ok). >> >> > > > >The issue here is that C<fold_constants> is not part of the public API and is supposed to >only be available only in the Perl core. A more complete look at embed.h shows > > #ifdef PERL_CORE > #define find_script Perl_find_script > #define force_list Perl_force_list > #define fold_constants Perl_fold_constants > #endif > >So, given this, I'd say this is a bug in B::Generate, rather than the Perl core. > > > The thing is, it compiles (with warnings), and passes its tests (with warnings) on 5.8.1, and 5.8.0 (IIRC, not at hand) and 5.8.2 ( tested this with patched version to build and test clean, 10 tests) it does also for 5.8.[34567] ths patch fixes the problem reported by doing this: - if (o->op_type == type) - o = fold_constants(o); + if (o->op_type == type) + o = (OP*) Perl_fold_constants(aTHX_ o); in other words, it does more or less what embed would do if it were part of the api. 0.01 Sat Dec 23 18:00:08 2000 - original version; created by h2xs 1.20 with options -A -n B::Generate I want to note that this module predates 5.6.0, and works (passes tests) on 5.6.2 requires => { perl => '5.5.62' }, Theres no embed.fnc in 5.6.2, but the old code 'fold_constants' compiles properly there. Its not clear to me how and/or why fold_constants didnt make the cut when the API/non-API choices were made.Thread Previous