Ævar Arnfjörð Bjarmason wrote: > On Tue, Aug 3, 2010 at 00:09, karl williamson <public@khwilliamson.com> wrote: > >> But I do have a related implementation question. perlreapi.pod describes >> how one can plug-in another regex handler. I believe that 'use re debug' is >> such a plug-in. What I don't see is how the writer of some other similar >> plug-in gets access to the various flag #defines, such as RXf_PMf_LOCALE, >> which is listed in the pod. I've scanned the XS documentation, and don't >> see how such a module gets access to the flag #defines used in a general >> function. Can they use any perl header? If so, we have lots more backward >> compatibility worries than I thought. The only place that I see some of >> these exported is in defsubs.h, but I think that is only for the B module, >> but I'm pretty clueless about that whole area of Perl. Any answers, advice >> or documentation pointers would be appreciated. > > Yes, the RXf_PMf_* flags are available to everyone. They're in > regexp.h which is used by perl.h. So every XS extension has access to > them. > Ah! I see it also includes op.h, and I was hoping to get rid of the flags like PMf_LOCALE which are just duplicates of the RXf_ ones. I think I can do that by changing ppport.h, or however it is generated. Do I need to worry about the defsubs.h exporting them, or is it really just used by B, and hence under our control. > This isn't something you should worry about a lot though. The regexp > interface is still experimental, and existing modules broke completely > in 5.12. Most of the re::engine::* stuff on CPAN doesn't work with > 5.12, although Vincent made re::engine::Plugin work on both 5.10 and > 5.12. > > The perlreapi.pod still documents the API as it was in 5.10 though, it > wasn't updated for those 5.10 -> 5.12 changes. > > The RXf_PMf_* flags also used to be called just RXf_* until late 2006 > when Yves changed them in bbe252da68. > > You might have to worry about a lot of stuff when getting this patch > through, breaking the regex "API" isn't one of them. > Ah!Thread Previous | Thread Next