diff options
| author | Stefan Behnel <stefan_ml@behnel.de> | 2012-07-31 11:54:03 +0200 |
|---|---|---|
| committer | Stefan Behnel <stefan_ml@behnel.de> | 2012-07-31 11:54:03 +0200 |
| commit | da1b53c2cd81ad04b67bcfff69ed4afbe7a33252 (patch) | |
| tree | e1cd71e22d3b5e8bd8ae5c162067a02ef983e7db /src/lxml/objectpath.pxi | |
| parent | a8434a894c33f31e99a322053e535a687c27a631 (diff) | |
| download | python-lxml-da1b53c2cd81ad04b67bcfff69ed4afbe7a33252.tar.gz | |
fix some more C compiler warnings in lxml.objectify
Diffstat (limited to 'src/lxml/objectpath.pxi')
| -rw-r--r-- | src/lxml/objectpath.pxi | 7 |
1 files changed, 2 insertions, 5 deletions
diff --git a/src/lxml/objectpath.pxi b/src/lxml/objectpath.pxi index 031af9f3..b43b2778 100644 --- a/src/lxml/objectpath.pxi +++ b/src/lxml/objectpath.pxi @@ -132,9 +132,6 @@ cdef _parseObjectPathString(path): cdef _parseObjectPathList(path): u"""Parse object path sequence into a (ns, name, index) list. """ - cdef xmlChar* index_pos - cdef xmlChar* index_end - cdef unsigned char* c_name cdef list new_path = [] for item in path: item = item.strip() @@ -144,7 +141,7 @@ cdef _parseObjectPathList(path): index = 0 else: ns, name = cetree.getNsTag(item) - c_name = <unsigned char*>_cstr(name) + c_name = _xcstr(name) index_pos = tree.xmlStrchr(c_name, c'[') if index_pos is NULL: index = 0 @@ -152,7 +149,7 @@ cdef _parseObjectPathList(path): index_end = tree.xmlStrchr(index_pos + 1, c']') if index_end is NULL: raise ValueError, u"index must be enclosed in []" - index = int((<unsigned char*>index_pos)[1:index_end - index_pos]) + index = int(index_pos[1:index_end - index_pos]) if python.PyList_GET_SIZE(new_path) == 0 and index != 0: raise ValueError, u"index not allowed on root node" name = <bytes>c_name[:index_pos - c_name] |
