Bug fixes, improvement on ID/IDREF support, 1.6.2, no memleaks, Daniel
diff --git a/xpath.c b/xpath.c
index 4ff7da5..a0f6a2a 100644
--- a/xpath.c
+++ b/xpath.c
@@ -769,7 +769,7 @@
  * Returns the xmlXPathContext just allocated.
  */
 xmlXPathContextPtr
-xmlXPathNewContext(xmlDocPtr doc, void *variables, void *functions) {
+xmlXPathNewContext(xmlDocPtr doc) {
     xmlXPathContextPtr ret;
 
     ret = (xmlXPathContextPtr) xmlMalloc(sizeof(xmlXPathContext));
@@ -779,9 +779,25 @@
     }
     memset(ret, 0 , (size_t) sizeof(xmlXPathContext));
     ret->doc = doc;
-    ret->variables = variables;
-    ret->functions = functions;
+
+    ret->nb_variables = 0;
+    ret->max_variables = 0;
+    ret->variables = NULL;
+
+    ret->nb_types = 0;
+    ret->max_types = 0;
+    ret->types = NULL;
+
+    ret->nb_funcs = 0;
+    ret->max_funcs = 0;
+    ret->funcs = NULL;
+
+    ret->nb_axis = 0;
+    ret->max_axis = 0;
+    ret->axis = NULL;
+
     ret->namespaces = NULL;
+    ret->user = NULL;
     ret->nsNr = 0;
     return(ret);
 }