1
0
mirror of https://gitlab.gnome.org/GNOME/libxslt synced 2025-07-01 13:41:39 +03:00

changes for the 'usual' setup.py to allow building a libxml2-python module

* python/generator.py python/libxslt.c: changes for the 'usual'
  setup.py to allow building a libxml2-python
  module based on the same code. The initialization is however
  different the 2 .so files fo libxml2 and libxslt are identical and
  they entry point initialize both libraries. this is done to avoid
  some possible nasty problem since the Python don't merge the maps
  of all shared modules.
* python/libxsl.py: attempt to cope with the shared library loading
  problem when both modules are not merged.
Daniel
This commit is contained in:
Daniel Veillard
2002-02-22 22:58:47 +00:00
parent ac76027718
commit bd90990db2
4 changed files with 408 additions and 303 deletions

View File

@ -4,6 +4,9 @@
* entry points where an automatically generated stub is either
* unpractical or would not match cleanly the Python model.
*
* If compiled with MERGED_MODULES, the entry point will be used to
* initialize both the libxml2 and the libxslt wrappers
*
* See Copyright for the status of this software.
*
* daniel@veillard.com
@ -352,8 +355,17 @@ static PyMethodDef libxsltMethods[] = {
{ NULL }
};
#ifdef MERGED_MODULES
extern void initlibxml2mod(void);
#endif
void initlibxsltmod(void) {
PyObject *m;
#ifdef MERGED_MODULES
initlibxml2mod();
#endif
m = Py_InitModule("libxsltmod", libxsltMethods);
/* libxslt_xmlErrorInitialize(); */
/*
@ -365,5 +377,7 @@ void initlibxsltmod(void) {
xmlLoadExtDtdDefaultValue = XML_DETECT_IDS | XML_COMPLETE_ATTRS;
/* xmlDefaultSAXHandlerInit(); */
xmlDefaultSAXHandler.cdataBlock = NULL;
}