diff options
author | Daniel Veillard <veillard@src.gnome.org> | 2002-02-04 00:17:01 +0000 |
---|---|---|
committer | Daniel Veillard <veillard@src.gnome.org> | 2002-02-04 00:17:01 +0000 |
commit | 36eea2d2ee84132e66552f84724e9b377d687681 (patch) | |
tree | ceac9c9beb80baacae6f7409c1dc7e559ee97945 /python/libxml_wrap.h | |
parent | 4e1b26cfeba7f5fad4f8bd12fb5ce7029f930b79 (diff) | |
download | libxml2-36eea2d2ee84132e66552f84724e9b377d687681.tar.gz |
hardened the addChild function added accessors needed for xmlNode, a bit
* tree.c: hardened the addChild function
* python/generator.py python/libxml.c python/libxml2-python-api.xml
python/libxml2class.txt python/libxml_wrap.h python/TODO:
added accessors needed for xmlNode, a bit more testing and
extension of interfaces
* python/tests/Makefile.am python/tests/build.py: added a test
build from scratch/save/load/check
Daniel
Diffstat (limited to 'python/libxml_wrap.h')
-rw-r--r-- | python/libxml_wrap.h | 11 |
1 files changed, 8 insertions, 3 deletions
diff --git a/python/libxml_wrap.h b/python/libxml_wrap.h index 68daf019..679260a3 100644 --- a/python/libxml_wrap.h +++ b/python/libxml_wrap.h @@ -15,20 +15,25 @@ #include <libxml/xinclude.h> #include <libxml/xpointer.h> -#define PyxmlNode_Get(v) (((PyxmlNode_Object *)(v))->obj) +#define PyxmlNode_Get(v) (((v) == Py_None) ? NULL : \ + (((PyxmlNode_Object *)(v))->obj)) typedef struct { PyObject_HEAD xmlNodePtr obj; } PyxmlNode_Object; -#define PyxmlXPathContext_Get(v) (((PyxmlXPathContext_Object *)(v))->obj) +#define PyxmlXPathContext_Get(v) (((v) == Py_None) ? NULL : \ + (((PyxmlXPathContext_Object *)(v))->obj)) + typedef struct { PyObject_HEAD xmlXPathContextPtr obj; } PyxmlXPathContext_Object; -#define PyparserCtxt_Get(v) (((PyparserCtxt_Object *)(v))->obj) +#define PyparserCtxt_Get(v) (((v) == Py_None) ? NULL : \ + (((PyparserCtxt_Object *)(v))->obj)) + typedef struct { PyObject_HEAD xmlParserCtxtPtr obj; |