> On Wed, 2005-02-09 at 12:48 +0000, Colin Robertson wrote:
>
>> So, the solutions: The more pleasant of the two possibilities is to
>> insert the Initialize call inside XMLPlatformUtils somewhere after the
>> long series of name mappings. That might be possible with SWIG, I don't
>> know. (I've never used SWIG. It wasn't obvious from the documentation
>> how to insert arbitrary code at that point.)
>> 
>> The slightly less pleasant solution is to put a call to
>> XML::Xercesc::XMLPlatformUtils_Initialize at the top of Xerces-extra.pm
>> (roughly where the INIT block is now). It's a little bit ugly to use
>> that name directly, but at that point in the code it's the only name
>> available.

"Lincoln A. Baxter" <[EMAIL PROTECTED]> writes:

> This sounds ugly... Might it be simpler, to just require the user to
> call a package global initialization function... such as
> XML::Xerces::Initialize(), which could internally protected from
> multiply invocations?

Hey Colin,

Thanks for taking the time to look into this. It was so long ago that
I decided to put the Intialize() into the INIT block that I had
forgotten the details.

Actually the simplest solution by far would be to place it in
Xerces-extra.pm - that file is a bunch of Perl-specific code that SWIG
places verbatim into Xerces.pm whenever the module is rebuilt by SWIG,
pehaps it is unaesthetic, but it would be much simpler to maintain.

It would be possible to require users to use Initialize() and
Terminate() themselves but it would be a sudden change from the way
things are currently done. 

BTW. Xerces-C now protects against multiple calls to both functions,
so we wouldn't need to.

What do people feel?

Cheers,
jas.

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to