[Lxml-checkins] r47670 - lxml/branch/pyrex-0.9.6.2-fixes/src/lxml
scoder at codespeak.net
scoder at codespeak.net
Sun Oct 21 14:27:46 CEST 2007
Author: scoder
Date: Sun Oct 21 14:27:45 2007
New Revision: 47670
Modified:
lxml/branch/pyrex-0.9.6.2-fixes/src/lxml/classlookup.pxi
lxml/branch/pyrex-0.9.6.2-fixes/src/lxml/etree.pyx
lxml/branch/pyrex-0.9.6.2-fixes/src/lxml/etreepublic.pxd
lxml/branch/pyrex-0.9.6.2-fixes/src/lxml/extensions.pxi
lxml/branch/pyrex-0.9.6.2-fixes/src/lxml/objectify.pyx
lxml/branch/pyrex-0.9.6.2-fixes/src/lxml/parser.pxi
lxml/branch/pyrex-0.9.6.2-fixes/src/lxml/parsertarget.pxi
lxml/branch/pyrex-0.9.6.2-fixes/src/lxml/public-api.pxi
lxml/branch/pyrex-0.9.6.2-fixes/src/lxml/pyclasslookup.pyx
Log:
lower case 'gil', public API and import changes
Modified: lxml/branch/pyrex-0.9.6.2-fixes/src/lxml/classlookup.pxi
==============================================================================
--- lxml/branch/pyrex-0.9.6.2-fixes/src/lxml/classlookup.pxi (original)
+++ lxml/branch/pyrex-0.9.6.2-fixes/src/lxml/classlookup.pxi Sun Oct 21 14:27:45 2007
@@ -48,7 +48,7 @@
################################################################################
# Element class lookup
-ctypedef object (*_element_class_lookup_function)(object, _Document, xmlNode*)
+ctypedef public object (*_element_class_lookup_function)(object, _Document, xmlNode*)
# class to store element class lookup functions
cdef public class ElementClassLookup [ type LxmlElementClassLookupType,
Modified: lxml/branch/pyrex-0.9.6.2-fixes/src/lxml/etree.pyx
==============================================================================
--- lxml/branch/pyrex-0.9.6.2-fixes/src/lxml/etree.pyx (original)
+++ lxml/branch/pyrex-0.9.6.2-fixes/src/lxml/etree.pyx Sun Oct 21 14:27:45 2007
@@ -1769,7 +1769,7 @@
return attribs
-ctypedef xmlNode* (*_node_to_node_function)(xmlNode*)
+ctypedef public xmlNode* (*_node_to_node_function)(xmlNode*)
cdef public class _ElementTagMatcher [ object LxmlElementTagMatcher,
type LxmlElementTagMatcherType ]:
Modified: lxml/branch/pyrex-0.9.6.2-fixes/src/lxml/etreepublic.pxd
==============================================================================
--- lxml/branch/pyrex-0.9.6.2-fixes/src/lxml/etreepublic.pxd (original)
+++ lxml/branch/pyrex-0.9.6.2-fixes/src/lxml/etreepublic.pxd Sun Oct 21 14:27:45 2007
@@ -16,10 +16,10 @@
int start_node_inclusive)
cdef void END_FOR_EACH_ELEMENT_FROM(tree.xmlNode* start_node)
-cdef extern from "etree.h":
+cdef extern from "etree_api.h":
# first function to call!
- cdef int import_etree(etree_module) except -1
+ cdef int import_etree() except -1
##########################################################################
# public ElementTree API classes
Modified: lxml/branch/pyrex-0.9.6.2-fixes/src/lxml/extensions.pxi
==============================================================================
--- lxml/branch/pyrex-0.9.6.2-fixes/src/lxml/extensions.pxi (original)
+++ lxml/branch/pyrex-0.9.6.2-fixes/src/lxml/extensions.pxi Sun Oct 21 14:27:45 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/branch/pyrex-0.9.6.2-fixes/src/lxml/objectify.pyx
==============================================================================
--- lxml/branch/pyrex-0.9.6.2-fixes/src/lxml/objectify.pyx (original)
+++ lxml/branch/pyrex-0.9.6.2-fixes/src/lxml/objectify.pyx Sun Oct 21 14:27:45 2007
@@ -10,7 +10,7 @@
cdef object etree
from lxml import etree
# initialize C-API of lxml.etree
-import_etree(etree)
+import_etree()
__version__ = etree.__version__
Modified: lxml/branch/pyrex-0.9.6.2-fixes/src/lxml/parser.pxi
==============================================================================
--- lxml/branch/pyrex-0.9.6.2-fixes/src/lxml/parser.pxi (original)
+++ lxml/branch/pyrex-0.9.6.2-fixes/src/lxml/parser.pxi Sun Oct 21 14:27:45 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/branch/pyrex-0.9.6.2-fixes/src/lxml/parsertarget.pxi
==============================================================================
--- lxml/branch/pyrex-0.9.6.2-fixes/src/lxml/parsertarget.pxi (original)
+++ lxml/branch/pyrex-0.9.6.2-fixes/src/lxml/parsertarget.pxi Sun Oct 21 14:27:45 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/branch/pyrex-0.9.6.2-fixes/src/lxml/public-api.pxi
==============================================================================
--- lxml/branch/pyrex-0.9.6.2-fixes/src/lxml/public-api.pxi (original)
+++ lxml/branch/pyrex-0.9.6.2-fixes/src/lxml/public-api.pxi Sun Oct 21 14:27:45 2007
@@ -1,156 +1,156 @@
# Public C API for lxml.etree
-cdef public _Element deepcopyNodeToDocument(_Document doc, xmlNode* c_root):
+cdef 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 api _ElementTree elementTreeFactory(_Element context_node):
return newElementTree(context_node, _ElementTree)
-cdef public _ElementTree newElementTree(_Element context_node,
+cdef 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 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 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 api _Element makeSubElement(_Element parent, tag, text, tail,
attrib, nsmap):
return _makeSubElement(parent, tag, text, tail, attrib, nsmap, None)
-cdef public void setElementClassLookupFunction(
+cdef api void setElementClassLookupFunction(
_element_class_lookup_function function, state):
_setElementClassLookupFunction(function, state)
-cdef public object lookupDefaultElementClass(state, doc, xmlNode* c_node):
+cdef api object lookupDefaultElementClass(state, doc, xmlNode* c_node):
return _lookupDefaultElementClass(state, doc, c_node)
-cdef public object lookupNamespaceElementClass(state, doc, xmlNode* c_node):
+cdef api object lookupNamespaceElementClass(state, doc, xmlNode* c_node):
return _find_nselement_class(state, doc, c_node)
-cdef public object callLookupFallback(FallbackElementClassLookup lookup,
+cdef 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 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 api _Document documentOrRaise(object input):
return _documentOrRaise(input)
-cdef public _Element rootNodeOrRaise(object input):
+cdef api _Element rootNodeOrRaise(object input):
return _rootNodeOrRaise(input)
-cdef public bint hasText(xmlNode* c_node):
+cdef api bint hasText(xmlNode* c_node):
return _hasText(c_node)
-cdef public bint hasTail(xmlNode* c_node):
+cdef api bint hasTail(xmlNode* c_node):
return _hasTail(c_node)
-cdef public object textOf(xmlNode* c_node):
+cdef 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 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 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 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 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 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 api object getAttributeValue(_Element element, key, default):
return _getAttributeValue(element, key, default)
-cdef public object iterattributes(_Element element, int keysvalues):
+cdef api object iterattributes(_Element element, int keysvalues):
return _attributeIteratorFactory(element, keysvalues)
-cdef public object collectAttributes(xmlNode* c_element, int keysvalues):
+cdef api object collectAttributes(xmlNode* c_element, int keysvalues):
return _collectAttributes(c_element, keysvalues)
-cdef public int setAttributeValue(_Element element, key, value) except -1:
+cdef api int setAttributeValue(_Element element, key, value) except -1:
return _setAttributeValue(element, key, value)
-cdef public int delAttribute(_Element element, key) except -1:
+cdef api int delAttribute(_Element element, key) except -1:
return _delAttribute(element, key)
-cdef public int delAttributeFromNsName(tree.xmlNode* c_element,
+cdef 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 api bint hasChild(xmlNode* c_node):
return _hasChild(c_node)
-cdef public xmlNode* findChild(xmlNode* c_node, Py_ssize_t index):
+cdef 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 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 api xmlNode* findChildBackwards(xmlNode* c_node, Py_ssize_t index):
return _findChildBackwards(c_node, index)
-cdef public xmlNode* nextElement(xmlNode* c_node):
+cdef api xmlNode* nextElement(xmlNode* c_node):
return _nextElement(c_node)
-cdef public xmlNode* previousElement(xmlNode* c_node):
+cdef api xmlNode* previousElement(xmlNode* c_node):
return _previousElement(c_node)
-cdef public void appendChild(_Element parent, _Element child):
+cdef api void appendChild(_Element parent, _Element child):
_appendChild(parent, child)
-cdef public object pyunicode(char* s):
+cdef api object pyunicode(char* s):
if s is NULL:
raise TypeError
return funicode(s)
-cdef public object utf8(object s):
+cdef api object utf8(object s):
return _utf8(s)
-cdef public object getNsTag(object tag):
+cdef api object getNsTag(object tag):
return _getNsTag(tag)
-cdef public object namespacedName(xmlNode* c_node):
+cdef api object namespacedName(xmlNode* c_node):
return _namespacedName(c_node)
-cdef public object namespacedNameFromNsName(char* href, char* name):
+cdef api object namespacedNameFromNsName(char* href, char* name):
return _namespacedNameFromNsName(href, name)
-cdef public void iteratorStoreNext(_ElementIterator iterator, _Element node):
+cdef api void iteratorStoreNext(_ElementIterator iterator, _Element node):
iterator._storeNext(node)
-cdef public void initTagMatch(_ElementTagMatcher matcher, tag):
+cdef api void initTagMatch(_ElementTagMatcher matcher, tag):
matcher._initTagMatch(tag)
-cdef public tree.xmlNs* findOrBuildNodeNsPrefix(
+cdef api tree.xmlNs* findOrBuildNodeNsPrefix(
_Document doc, xmlNode* c_node, char* href, char* prefix) except NULL:
if doc is None:
raise TypeError
Modified: lxml/branch/pyrex-0.9.6.2-fixes/src/lxml/pyclasslookup.pyx
==============================================================================
--- lxml/branch/pyrex-0.9.6.2-fixes/src/lxml/pyclasslookup.pyx (original)
+++ lxml/branch/pyrex-0.9.6.2-fixes/src/lxml/pyclasslookup.pyx Sun Oct 21 14:27:45 2007
@@ -13,7 +13,7 @@
cdef object etree
from lxml import etree
# initialize C-API of lxml.etree
-import_etree(etree)
+import_etree()
__version__ = etree.__version__
More information about the lxml-checkins
mailing list