summaryrefslogtreecommitdiff
path: root/src/lxml/docloader.pxi
diff options
context:
space:
mode:
Diffstat (limited to 'src/lxml/docloader.pxi')
-rw-r--r--src/lxml/docloader.pxi7
1 files changed, 6 insertions, 1 deletions
diff --git a/src/lxml/docloader.pxi b/src/lxml/docloader.pxi
index dd95e1e8..42409a53 100644
--- a/src/lxml/docloader.pxi
+++ b/src/lxml/docloader.pxi
@@ -1,6 +1,7 @@
# Custom resolver API
ctypedef enum _InputDocumentDataType:
+ PARSER_DATA_INVALID
PARSER_DATA_EMPTY
PARSER_DATA_STRING
PARSER_DATA_FILENAME
@@ -12,6 +13,10 @@ cdef class _InputDocument:
cdef object _filename
cdef object _file
+ def __cinit__(self):
+ self._type = PARSER_DATA_INVALID
+
+
cdef class Resolver:
u"This is the base class of all resolvers."
def resolve(self, system_url, public_id, context):
@@ -101,7 +106,7 @@ cdef class Resolver:
cdef class _ResolverRegistry:
cdef object _resolvers
cdef Resolver _default_resolver
- def __init__(self, Resolver default_resolver=None):
+ def __cinit__(self, Resolver default_resolver=None):
self._resolvers = set()
self._default_resolver = default_resolver