Lines Matching refs:node
127 if (nodeptr->node != NULL && nodeptr->node->type != XML_DOCUMENT_NODE) { in php_libxml_unregister_node()
128 nodeptr->node->_private = NULL; in php_libxml_unregister_node()
130 nodeptr->node = NULL; in php_libxml_unregister_node()
137 static void php_libxml_node_free(xmlNodePtr node) in php_libxml_node_free() argument
139 if(node) { in php_libxml_node_free()
140 if (node->_private != NULL) { in php_libxml_node_free()
141 ((php_libxml_node_ptr *) node->_private)->node = NULL; in php_libxml_node_free()
143 switch (node->type) { in php_libxml_node_free()
145 xmlFreeProp((xmlAttrPtr) node); in php_libxml_node_free()
153 if (node->name != NULL) { in php_libxml_node_free()
154 xmlFree((char *) node->name); in php_libxml_node_free()
156 if (((xmlEntityPtr) node)->ExternalID != NULL) { in php_libxml_node_free()
157 xmlFree((char *) ((xmlEntityPtr) node)->ExternalID); in php_libxml_node_free()
159 if (((xmlEntityPtr) node)->SystemID != NULL) { in php_libxml_node_free()
160 xmlFree((char *) ((xmlEntityPtr) node)->SystemID); in php_libxml_node_free()
162 xmlFree(node); in php_libxml_node_free()
165 if (node->ns) { in php_libxml_node_free()
166 xmlFreeNs(node->ns); in php_libxml_node_free()
167 node->ns = NULL; in php_libxml_node_free()
169 node->type = XML_ELEMENT_NODE; in php_libxml_node_free()
172 xmlFreeNode(node); in php_libxml_node_free()
177 PHP_LIBXML_API void php_libxml_node_free_list(xmlNodePtr node) in php_libxml_node_free_list() argument
181 if (node != NULL) { in php_libxml_node_free_list()
182 curnode = node; in php_libxml_node_free_list()
184 node = curnode; in php_libxml_node_free_list()
185 switch (node->type) { in php_libxml_node_free_list()
191 php_libxml_node_free_list((xmlNodePtr) node->properties); in php_libxml_node_free_list()
194 if ((node->doc != NULL) && (((xmlAttrPtr) node)->atype == XML_ATTRIBUTE_ID)) { in php_libxml_node_free_list()
195 xmlRemoveID(node->doc, (xmlAttrPtr) node); in php_libxml_node_free_list()
203 php_libxml_node_free_list(node->children); in php_libxml_node_free_list()
206 php_libxml_node_free_list(node->children); in php_libxml_node_free_list()
207 php_libxml_node_free_list((xmlNodePtr) node->properties); in php_libxml_node_free_list()
210 curnode = node->next; in php_libxml_node_free_list()
211 xmlUnlinkNode(node); in php_libxml_node_free_list()
212 if (php_libxml_unregister_node(node) == 0) { in php_libxml_node_free_list()
213 node->doc = NULL; in php_libxml_node_free_list()
215 php_libxml_node_free(node); in php_libxml_node_free_list()
496 error_copy.node = NULL; in _php_list_set_error_structure()
1145 xmlNodePtr node = NULL; in php_libxml_import_node() local
1154 node = export_hnd->export_func(object); in php_libxml_import_node()
1157 return node; in php_libxml_import_node()
1160 PHP_LIBXML_API int php_libxml_increment_node_ptr(php_libxml_node_object *object, xmlNodePtr node, v… in php_libxml_increment_node_ptr() argument
1164 if (object != NULL && node != NULL) { in php_libxml_increment_node_ptr()
1165 if (object->node != NULL) { in php_libxml_increment_node_ptr()
1166 if (object->node->node == node) { in php_libxml_increment_node_ptr()
1167 return object->node->refcount; in php_libxml_increment_node_ptr()
1172 if (node->_private != NULL) { in php_libxml_increment_node_ptr()
1173 object->node = node->_private; in php_libxml_increment_node_ptr()
1174 ret_refcount = ++object->node->refcount; in php_libxml_increment_node_ptr()
1176 if (object->node->_private == NULL) { in php_libxml_increment_node_ptr()
1177 object->node->_private = private_data; in php_libxml_increment_node_ptr()
1181 object->node = emalloc(sizeof(php_libxml_node_ptr)); in php_libxml_increment_node_ptr()
1182 object->node->node = node; in php_libxml_increment_node_ptr()
1183 object->node->refcount = 1; in php_libxml_increment_node_ptr()
1184 object->node->_private = private_data; in php_libxml_increment_node_ptr()
1185 node->_private = object->node; in php_libxml_increment_node_ptr()
1197 if (object != NULL && object->node != NULL) { in php_libxml_decrement_node_ptr()
1198 obj_node = (php_libxml_node_ptr *) object->node; in php_libxml_decrement_node_ptr()
1201 if (obj_node->node != NULL) { in php_libxml_decrement_node_ptr()
1202 obj_node->node->_private = NULL; in php_libxml_decrement_node_ptr()
1206 object->node = NULL; in php_libxml_decrement_node_ptr()
1255 PHP_LIBXML_API void php_libxml_node_free_resource(xmlNodePtr node) in php_libxml_node_free_resource() argument
1257 if (!node) { in php_libxml_node_free_resource()
1261 switch (node->type) { in php_libxml_node_free_resource()
1266 if (node->parent == NULL || node->type == XML_NAMESPACE_DECL) { in php_libxml_node_free_resource()
1267 php_libxml_node_free_list((xmlNodePtr) node->children); in php_libxml_node_free_resource()
1268 switch (node->type) { in php_libxml_node_free_resource()
1279 php_libxml_node_free_list((xmlNodePtr) node->properties); in php_libxml_node_free_resource()
1281 if (php_libxml_unregister_node(node) == 0) { in php_libxml_node_free_resource()
1282 node->doc = NULL; in php_libxml_node_free_resource()
1284 php_libxml_node_free(node); in php_libxml_node_free_resource()
1286 php_libxml_unregister_node(node); in php_libxml_node_free_resource()
1297 if (object != NULL && object->node != NULL) { in php_libxml_node_decrement_resource()
1298 obj_node = (php_libxml_node_ptr *) object->node; in php_libxml_node_decrement_resource()
1299 nodep = object->node->node; in php_libxml_node_decrement_resource()