[Lxml-checkins] r48300 - in lxml/trunk: doc src/lxml

scoder at codespeak.net scoder at codespeak.net
Sun Nov 4 19:42:26 CET 2007


Author: scoder
Date: Sun Nov  4 19:42:25 2007
New Revision: 48300

Modified:
   lxml/trunk/doc/build.txt
   lxml/trunk/src/lxml/etreepublic.pxd
   lxml/trunk/src/lxml/extensions.pxi
   lxml/trunk/src/lxml/lxml.objectify.pyx
   lxml/trunk/src/lxml/lxml.pyclasslookup.pyx
   lxml/trunk/src/lxml/parser.pxi
   lxml/trunk/src/lxml/parsertarget.pxi
   lxml/trunk/src/lxml/public-api.pxi
Log:
make it build with Cython 0.9.6.8 (now required!)

Modified: lxml/trunk/doc/build.txt
==============================================================================
--- lxml/trunk/doc/build.txt	(original)
+++ lxml/trunk/doc/build.txt	Sun Nov  4 19:42:25 2007
@@ -33,12 +33,12 @@
 be an lxml developer, you do need a working Cython installation.  You can use
 EasyInstall_ to install it::
 
-    easy_install Cython==0.9.6.7
+    easy_install Cython==0.9.6.8
 
 .. _EasyInstall: http://peak.telecommunity.com/DevCenter/EasyInstall
 
-lxml currently requires Cython 0.9.6.7, but it should work with later
-versions.
+lxml currently requires at least Cython 0.9.6.8, but later versions
+should work.
 
 
 Subversion

Modified: lxml/trunk/src/lxml/etreepublic.pxd
==============================================================================
--- lxml/trunk/src/lxml/etreepublic.pxd	(original)
+++ lxml/trunk/src/lxml/etreepublic.pxd	Sun Nov  4 19:42:25 2007
@@ -16,10 +16,10 @@
                                           int start_node_inclusive)
     cdef void END_FOR_EACH_ELEMENT_FROM(tree.xmlNode* start_node)
 
-cdef extern from "lxml.etree.h":
+cdef extern from "lxml.etree_api.h":
 
     # first function to call!
-    cdef int import_etree(etree_module) except -1
+    cdef int import_lxml__etree() except -1
 
     ##########################################################################
     # public ElementTree API classes

Modified: lxml/trunk/src/lxml/extensions.pxi
==============================================================================
--- lxml/trunk/src/lxml/extensions.pxi	(original)
+++ lxml/trunk/src/lxml/extensions.pxi	Sun Nov  4 19:42:25 2007
@@ -583,7 +583,7 @@
 # lookup the function by name and call it
 
 cdef void _xpath_function_call(xpath.xmlXPathParserContext* ctxt,
-                               int nargs) with GIL:
+                               int nargs) with gil:
     cdef xpath.xmlXPathContext* rctxt
     cdef _BaseContext context
     rctxt = ctxt.context

Modified: lxml/trunk/src/lxml/lxml.objectify.pyx
==============================================================================
--- lxml/trunk/src/lxml/lxml.objectify.pyx	(original)
+++ lxml/trunk/src/lxml/lxml.objectify.pyx	Sun Nov  4 19:42:25 2007
@@ -1,6 +1,6 @@
 from etreepublic cimport _Document, _Element, ElementBase
 from etreepublic cimport _ElementIterator, ElementClassLookup
-from etreepublic cimport elementFactory, import_etree, textOf
+from etreepublic cimport elementFactory, import_lxml__etree, textOf
 from python cimport callable, _cstr
 cimport etreepublic as cetree
 cimport python
@@ -10,7 +10,7 @@
 cdef object etree
 from lxml import etree
 # initialize C-API of lxml.etree
-import_etree(etree)
+import_lxml__etree()
 
 __version__ = etree.__version__
 

Modified: lxml/trunk/src/lxml/lxml.pyclasslookup.pyx
==============================================================================
--- lxml/trunk/src/lxml/lxml.pyclasslookup.pyx	(original)
+++ lxml/trunk/src/lxml/lxml.pyclasslookup.pyx	Sun Nov  4 19:42:25 2007
@@ -1,6 +1,6 @@
 from etreepublic cimport _Document, _Element, ElementBase
 from etreepublic cimport ElementClassLookup, FallbackElementClassLookup
-from etreepublic cimport elementFactory, import_etree
+from etreepublic cimport elementFactory, import_lxml__etree
 from python cimport str, repr, isinstance, issubclass, iter
 from python cimport _cstr
 cimport etreepublic as cetree
@@ -13,7 +13,7 @@
 cdef object etree
 from lxml import etree
 # initialize C-API of lxml.etree
-import_etree(etree)
+import_lxml__etree()
 
 __version__ = etree.__version__
 

Modified: lxml/trunk/src/lxml/parser.pxi
==============================================================================
--- lxml/trunk/src/lxml/parser.pxi	(original)
+++ lxml/trunk/src/lxml/parser.pxi	Sun Nov  4 19:42:25 2007
@@ -288,7 +288,7 @@
             self._exc_context._store_raised()
             return -1
 
-cdef int _readFilelikeParser(void* ctxt, char* c_buffer, int c_size) with GIL:
+cdef int _readFilelikeParser(void* ctxt, char* c_buffer, int c_size) with gil:
     return (<_FileReaderContext>ctxt).copyToBuffer(c_buffer, c_size)
 
 ############################################################
@@ -297,7 +297,7 @@
 
 cdef  xmlparser.xmlParserInput* _parser_resolve_from_python(
     char* c_url, char* c_pubid, xmlparser.xmlParserCtxt* c_context,
-    int* error) with GIL:
+    int* error) with gil:
     # call the Python document loaders
     cdef xmlparser.xmlParserInput* c_input
     cdef _ResolverContext context

Modified: lxml/trunk/src/lxml/parsertarget.pxi
==============================================================================
--- lxml/trunk/src/lxml/parsertarget.pxi	(original)
+++ lxml/trunk/src/lxml/parsertarget.pxi	Sun Nov  4 19:42:25 2007
@@ -87,7 +87,7 @@
                           char* c_namespace, int c_nb_namespaces,
                           char** c_namespaces,
                           int c_nb_attributes, int c_nb_defaulted,
-                          char** c_attributes) with GIL:
+                          char** c_attributes) with gil:
     cdef _TargetParserContext context
     cdef xmlparser.xmlParserCtxt* c_ctxt
     cdef int i
@@ -118,7 +118,7 @@
         _handleSaxTargetException(context, c_ctxt)
 
 cdef void _targetSaxEnd(void* ctxt, char* c_localname, char* c_prefix,
-                        char* c_namespace) with GIL:
+                        char* c_namespace) with gil:
     cdef _TargetParserContext context
     cdef xmlparser.xmlParserCtxt* c_ctxt
     c_ctxt = <xmlparser.xmlParserCtxt*>ctxt
@@ -131,7 +131,7 @@
     except:
         _handleSaxTargetException(context, c_ctxt)
 
-cdef void _targetSaxData(void* ctxt, char* c_data, int data_len) with GIL:
+cdef void _targetSaxData(void* ctxt, char* c_data, int data_len) with gil:
     cdef _TargetParserContext context
     cdef xmlparser.xmlParserCtxt* c_ctxt
     c_ctxt = <xmlparser.xmlParserCtxt*>ctxt
@@ -145,7 +145,7 @@
         _handleSaxTargetException(context, c_ctxt)
 
 cdef void _targetSaxDoctype(void* ctxt, char* c_name, char* c_public,
-                       char* c_system) with GIL:
+                       char* c_system) with gil:
     cdef _TargetParserContext context
     cdef xmlparser.xmlParserCtxt* c_ctxt
     c_ctxt = <xmlparser.xmlParserCtxt*>ctxt
@@ -162,7 +162,7 @@
     except:
         _handleSaxTargetException(context, c_ctxt)
 
-cdef void _targetSaxPI(void* ctxt, char* c_target, char* c_data) with GIL:
+cdef void _targetSaxPI(void* ctxt, char* c_target, char* c_data) with gil:
     cdef _TargetParserContext context
     cdef xmlparser.xmlParserCtxt* c_ctxt
     c_ctxt = <xmlparser.xmlParserCtxt*>ctxt
@@ -176,7 +176,7 @@
     except:
         _handleSaxTargetException(context, c_ctxt)
 
-cdef void _targetSaxComment(void* ctxt, char* c_data, int data_len) with GIL:
+cdef void _targetSaxComment(void* ctxt, char* c_data, int data_len) with gil:
     cdef _TargetParserContext context
     cdef xmlparser.xmlParserCtxt* c_ctxt
     c_ctxt = <xmlparser.xmlParserCtxt*>ctxt

Modified: lxml/trunk/src/lxml/public-api.pxi
==============================================================================
--- lxml/trunk/src/lxml/public-api.pxi	(original)
+++ lxml/trunk/src/lxml/public-api.pxi	Sun Nov  4 19:42:25 2007
@@ -1,156 +1,156 @@
 # Public C API for lxml.etree
 
-cdef public _Element deepcopyNodeToDocument(_Document doc, xmlNode* c_root):
+cdef public api _Element deepcopyNodeToDocument(_Document doc, xmlNode* c_root):
     "Recursively copy the element into the document. doc is not modified."
     cdef xmlNode* c_node
     c_node = _copyNodeToDoc(c_root, doc._c_doc)
     return _elementFactory(doc, c_node)
 
-cdef public _ElementTree elementTreeFactory(_Element context_node):
+cdef public api _ElementTree elementTreeFactory(_Element context_node):
     return newElementTree(context_node, _ElementTree)
 
-cdef public _ElementTree newElementTree(_Element context_node,
+cdef public api _ElementTree newElementTree(_Element context_node,
                                         object subclass):
     if <void*>context_node is NULL or context_node is None:
         raise TypeError
 
     return _newElementTree(context_node._doc, context_node, subclass)
 
-cdef public _Element elementFactory(_Document doc, xmlNode* c_node):
+cdef public api _Element elementFactory(_Document doc, xmlNode* c_node):
     if c_node is NULL or doc is None:
         raise TypeError
     return _elementFactory(doc, c_node)
 
-cdef public _Element makeElement(tag, _Document doc, parser,
+cdef public api _Element makeElement(tag, _Document doc, parser,
                                  text, tail, attrib, nsmap):
     return _makeElement(tag, NULL, doc, parser, text, tail, attrib, nsmap, None)
 
-cdef public _Element makeSubElement(_Element parent, tag, text, tail,
+cdef public api _Element makeSubElement(_Element parent, tag, text, tail,
                                     attrib, nsmap):
     return _makeSubElement(parent, tag, text, tail, attrib, nsmap, None)
 
-cdef public void setElementClassLookupFunction(
+cdef public api void setElementClassLookupFunction(
     _element_class_lookup_function function, state):
     _setElementClassLookupFunction(function, state)
 
-cdef public object lookupDefaultElementClass(state, doc, xmlNode* c_node):
+cdef public api object lookupDefaultElementClass(state, doc, xmlNode* c_node):
     return _lookupDefaultElementClass(state, doc, c_node)
 
-cdef public object lookupNamespaceElementClass(state, doc, xmlNode* c_node):
+cdef public api object lookupNamespaceElementClass(state, doc, xmlNode* c_node):
     return _find_nselement_class(state, doc, c_node)
 
-cdef public object callLookupFallback(FallbackElementClassLookup lookup,
+cdef public api object callLookupFallback(FallbackElementClassLookup lookup,
                                       _Document doc, xmlNode* c_node):
     return lookup._callFallback(doc, c_node)
 
-cdef public int tagMatches(xmlNode* c_node, char* c_href, char* c_name):
+cdef public api int tagMatches(xmlNode* c_node, char* c_href, char* c_name):
     if c_node is NULL:
         return -1
     return _tagMatches(c_node, c_href, c_name)
 
-cdef public _Document documentOrRaise(object input):
+cdef public api _Document documentOrRaise(object input):
     return _documentOrRaise(input)
 
-cdef public _Element rootNodeOrRaise(object input):
+cdef public api _Element rootNodeOrRaise(object input):
     return _rootNodeOrRaise(input)
 
-cdef public bint hasText(xmlNode* c_node):
+cdef public api bint hasText(xmlNode* c_node):
     return _hasText(c_node)
 
-cdef public bint hasTail(xmlNode* c_node):
+cdef public api bint hasTail(xmlNode* c_node):
     return _hasTail(c_node)
 
-cdef public object textOf(xmlNode* c_node):
+cdef public api object textOf(xmlNode* c_node):
     if c_node is NULL:
         return None
     return _collectText(c_node.children)
 
-cdef public object tailOf(xmlNode* c_node):
+cdef public api object tailOf(xmlNode* c_node):
     if c_node is NULL:
         return None
     return _collectText(c_node.next)
 
-cdef public int setNodeText(xmlNode* c_node, text) except -1:
+cdef public api int setNodeText(xmlNode* c_node, text) except -1:
     if c_node is NULL:
         raise ValueError
     return _setNodeText(c_node, text)
 
-cdef public int setTailText(xmlNode* c_node, text) except -1:
+cdef public api int setTailText(xmlNode* c_node, text) except -1:
     if c_node is NULL:
         raise ValueError
     return _setTailText(c_node, text)
 
-cdef public object attributeValue(xmlNode* c_element, xmlAttr* c_attrib_node):
+cdef public api object attributeValue(xmlNode* c_element, xmlAttr* c_attrib_node):
     return _attributeValue(c_element, c_attrib_node)
 
-cdef public object attributeValueFromNsName(xmlNode* c_element,
+cdef public api object attributeValueFromNsName(xmlNode* c_element,
                                             char* ns, char* name):
     return _attributeValueFromNsName(c_element, ns, name)
 
-cdef public object getAttributeValue(_Element element, key, default):
+cdef public api object getAttributeValue(_Element element, key, default):
     return _getAttributeValue(element, key, default)
 
-cdef public object iterattributes(_Element element, int keysvalues):
+cdef public api object iterattributes(_Element element, int keysvalues):
     return _attributeIteratorFactory(element, keysvalues)
 
-cdef public object collectAttributes(xmlNode* c_element, int keysvalues):
+cdef public api object collectAttributes(xmlNode* c_element, int keysvalues):
     return _collectAttributes(c_element, keysvalues)
 
-cdef public int setAttributeValue(_Element element, key, value) except -1:
+cdef public api int setAttributeValue(_Element element, key, value) except -1:
     return _setAttributeValue(element, key, value)
 
-cdef public int delAttribute(_Element element, key) except -1:
+cdef public api int delAttribute(_Element element, key) except -1:
     return _delAttribute(element, key)
 
-cdef public int delAttributeFromNsName(tree.xmlNode* c_element,
+cdef public api int delAttributeFromNsName(tree.xmlNode* c_element,
                                        char* c_href, char* c_name):
     return _delAttributeFromNsName(c_element, c_href, c_name)
 
-cdef public bint hasChild(xmlNode* c_node):
+cdef public api bint hasChild(xmlNode* c_node):
     return _hasChild(c_node)
 
-cdef public xmlNode* findChild(xmlNode* c_node, Py_ssize_t index):
+cdef public api xmlNode* findChild(xmlNode* c_node, Py_ssize_t index):
     return _findChild(c_node, index)
 
-cdef public xmlNode* findChildForwards(xmlNode* c_node, Py_ssize_t index):
+cdef public api xmlNode* findChildForwards(xmlNode* c_node, Py_ssize_t index):
     return _findChildForwards(c_node, index)
 
-cdef public xmlNode* findChildBackwards(xmlNode* c_node, Py_ssize_t index):
+cdef public api xmlNode* findChildBackwards(xmlNode* c_node, Py_ssize_t index):
     return _findChildBackwards(c_node, index)
 
-cdef public xmlNode* nextElement(xmlNode* c_node):
+cdef public api xmlNode* nextElement(xmlNode* c_node):
     return _nextElement(c_node)
 
-cdef public xmlNode* previousElement(xmlNode* c_node):
+cdef public api xmlNode* previousElement(xmlNode* c_node):
     return _previousElement(c_node)
 
-cdef public void appendChild(_Element parent, _Element child):
+cdef public api void appendChild(_Element parent, _Element child):
     _appendChild(parent, child)
 
-cdef public object pyunicode(char* s):
+cdef public api object pyunicode(char* s):
     if s is NULL:
         raise TypeError
     return funicode(s)
 
-cdef public object utf8(object s):
+cdef public api object utf8(object s):
     return _utf8(s)
 
-cdef public object getNsTag(object tag):
+cdef public api object getNsTag(object tag):
     return _getNsTag(tag)
 
-cdef public object namespacedName(xmlNode* c_node):
+cdef public api object namespacedName(xmlNode* c_node):
     return _namespacedName(c_node)
 
-cdef public object namespacedNameFromNsName(char* href, char* name):
+cdef public api object namespacedNameFromNsName(char* href, char* name):
     return _namespacedNameFromNsName(href, name)
 
-cdef public void iteratorStoreNext(_ElementIterator iterator, _Element node):
+cdef public api void iteratorStoreNext(_ElementIterator iterator, _Element node):
     iterator._storeNext(node)
 
-cdef public void initTagMatch(_ElementTagMatcher matcher, tag):
+cdef public api void initTagMatch(_ElementTagMatcher matcher, tag):
     matcher._initTagMatch(tag)
 
-cdef public tree.xmlNs* findOrBuildNodeNsPrefix(
+cdef public api tree.xmlNs* findOrBuildNodeNsPrefix(
     _Document doc, xmlNode* c_node, char* href, char* prefix) except NULL:
     if doc is None:
         raise TypeError


More information about the lxml-checkins mailing list