Lines Matching refs:node
178 if (nodeptr->node != NULL && nodeptr->node->type != XML_DOCUMENT_NODE) { in php_libxml_unregister_node()
179 nodeptr->node->_private = NULL; in php_libxml_unregister_node()
181 nodeptr->node = NULL; in php_libxml_unregister_node()
188 static void php_libxml_node_free(xmlNodePtr node) in php_libxml_node_free() argument
190 if(node) { in php_libxml_node_free()
191 if (node->_private != NULL) { in php_libxml_node_free()
192 ((php_libxml_node_ptr *) node->_private)->node = NULL; in php_libxml_node_free()
194 switch (node->type) { in php_libxml_node_free()
196 xmlFreeProp((xmlAttrPtr) node); in php_libxml_node_free()
204 if (node->name != NULL) { in php_libxml_node_free()
205 xmlFree((char *) node->name); in php_libxml_node_free()
207 if (((xmlEntityPtr) node)->ExternalID != NULL) { in php_libxml_node_free()
208 xmlFree((char *) ((xmlEntityPtr) node)->ExternalID); in php_libxml_node_free()
210 if (((xmlEntityPtr) node)->SystemID != NULL) { in php_libxml_node_free()
211 xmlFree((char *) ((xmlEntityPtr) node)->SystemID); in php_libxml_node_free()
213 xmlFree(node); in php_libxml_node_free()
216 if (node->ns) { in php_libxml_node_free()
217 xmlFreeNs(node->ns); in php_libxml_node_free()
218 node->ns = NULL; in php_libxml_node_free()
220 node->type = XML_ELEMENT_NODE; in php_libxml_node_free()
222 xmlFreeNode(node); in php_libxml_node_free()
227 PHP_LIBXML_API void php_libxml_node_free_list(xmlNodePtr node) in php_libxml_node_free_list() argument
231 if (node != NULL) { in php_libxml_node_free_list()
232 curnode = node; in php_libxml_node_free_list()
234 node = curnode; in php_libxml_node_free_list()
235 switch (node->type) { in php_libxml_node_free_list()
241 php_libxml_node_free_list((xmlNodePtr) node->properties); in php_libxml_node_free_list()
244 if ((node->doc != NULL) && (((xmlAttrPtr) node)->atype == XML_ATTRIBUTE_ID)) { in php_libxml_node_free_list()
245 xmlRemoveID(node->doc, (xmlAttrPtr) node); in php_libxml_node_free_list()
252 php_libxml_node_free_list(node->children); in php_libxml_node_free_list()
255 php_libxml_node_free_list(node->children); in php_libxml_node_free_list()
256 php_libxml_node_free_list((xmlNodePtr) node->properties); in php_libxml_node_free_list()
259 curnode = node->next; in php_libxml_node_free_list()
260 xmlUnlinkNode(node); in php_libxml_node_free_list()
261 if (php_libxml_unregister_node(node) == 0) { in php_libxml_node_free_list()
262 node->doc = NULL; in php_libxml_node_free_list()
264 php_libxml_node_free(node); in php_libxml_node_free_list()
495 error_copy.node = NULL; in _php_list_set_error_structure()
1181 xmlNodePtr node = NULL; in php_libxml_import_node() local
1190 node = export_hnd->export_func(object); in php_libxml_import_node()
1193 return node; in php_libxml_import_node()
1196 PHP_LIBXML_API int php_libxml_increment_node_ptr(php_libxml_node_object *object, xmlNodePtr node, v… in php_libxml_increment_node_ptr() argument
1200 if (object != NULL && node != NULL) { in php_libxml_increment_node_ptr()
1201 if (object->node != NULL) { in php_libxml_increment_node_ptr()
1202 if (object->node->node == node) { in php_libxml_increment_node_ptr()
1203 return object->node->refcount; in php_libxml_increment_node_ptr()
1208 if (node->_private != NULL) { in php_libxml_increment_node_ptr()
1209 object->node = node->_private; in php_libxml_increment_node_ptr()
1210 ret_refcount = ++object->node->refcount; in php_libxml_increment_node_ptr()
1212 if (object->node->_private == NULL) { in php_libxml_increment_node_ptr()
1213 object->node->_private = private_data; in php_libxml_increment_node_ptr()
1217 object->node = emalloc(sizeof(php_libxml_node_ptr)); in php_libxml_increment_node_ptr()
1218 object->node->node = node; in php_libxml_increment_node_ptr()
1219 object->node->refcount = 1; in php_libxml_increment_node_ptr()
1220 object->node->_private = private_data; in php_libxml_increment_node_ptr()
1221 node->_private = object->node; in php_libxml_increment_node_ptr()
1233 if (object != NULL && object->node != NULL) { in php_libxml_decrement_node_ptr()
1234 obj_node = (php_libxml_node_ptr *) object->node; in php_libxml_decrement_node_ptr()
1237 if (obj_node->node != NULL) { in php_libxml_decrement_node_ptr()
1238 obj_node->node->_private = NULL; in php_libxml_decrement_node_ptr()
1242 object->node = NULL; in php_libxml_decrement_node_ptr()
1291 PHP_LIBXML_API void php_libxml_node_free_resource(xmlNodePtr node) in php_libxml_node_free_resource() argument
1293 if (!node) { in php_libxml_node_free_resource()
1297 switch (node->type) { in php_libxml_node_free_resource()
1302 if (node->parent == NULL || node->type == XML_NAMESPACE_DECL) { in php_libxml_node_free_resource()
1303 php_libxml_node_free_list((xmlNodePtr) node->children); in php_libxml_node_free_resource()
1304 switch (node->type) { in php_libxml_node_free_resource()
1315 php_libxml_node_free_list((xmlNodePtr) node->properties); in php_libxml_node_free_resource()
1317 if (php_libxml_unregister_node(node) == 0) { in php_libxml_node_free_resource()
1318 node->doc = NULL; in php_libxml_node_free_resource()
1320 php_libxml_node_free(node); in php_libxml_node_free_resource()
1322 php_libxml_unregister_node(node); in php_libxml_node_free_resource()
1333 if (object != NULL && object->node != NULL) { in php_libxml_node_decrement_resource()
1334 obj_node = (php_libxml_node_ptr *) object->node; in php_libxml_node_decrement_resource()
1335 nodep = object->node->node; in php_libxml_node_decrement_resource()