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()
1177 xmlNodePtr node = NULL; in php_libxml_import_node() local
1186 node = export_hnd->export_func(object); in php_libxml_import_node()
1189 return node; in php_libxml_import_node()
1192 PHP_LIBXML_API int php_libxml_increment_node_ptr(php_libxml_node_object *object, xmlNodePtr node, v… in php_libxml_increment_node_ptr() argument
1196 if (object != NULL && node != NULL) { in php_libxml_increment_node_ptr()
1197 if (object->node != NULL) { in php_libxml_increment_node_ptr()
1198 if (object->node->node == node) { in php_libxml_increment_node_ptr()
1199 return object->node->refcount; in php_libxml_increment_node_ptr()
1204 if (node->_private != NULL) { in php_libxml_increment_node_ptr()
1205 object->node = node->_private; in php_libxml_increment_node_ptr()
1206 ret_refcount = ++object->node->refcount; in php_libxml_increment_node_ptr()
1208 if (object->node->_private == NULL) { in php_libxml_increment_node_ptr()
1209 object->node->_private = private_data; in php_libxml_increment_node_ptr()
1213 object->node = emalloc(sizeof(php_libxml_node_ptr)); in php_libxml_increment_node_ptr()
1214 object->node->node = node; in php_libxml_increment_node_ptr()
1215 object->node->refcount = 1; in php_libxml_increment_node_ptr()
1216 object->node->_private = private_data; in php_libxml_increment_node_ptr()
1217 node->_private = object->node; in php_libxml_increment_node_ptr()
1229 if (object != NULL && object->node != NULL) { in php_libxml_decrement_node_ptr()
1230 obj_node = (php_libxml_node_ptr *) object->node; in php_libxml_decrement_node_ptr()
1233 if (obj_node->node != NULL) { in php_libxml_decrement_node_ptr()
1234 obj_node->node->_private = NULL; in php_libxml_decrement_node_ptr()
1238 object->node = NULL; in php_libxml_decrement_node_ptr()
1287 PHP_LIBXML_API void php_libxml_node_free_resource(xmlNodePtr node) in php_libxml_node_free_resource() argument
1289 if (!node) { in php_libxml_node_free_resource()
1293 switch (node->type) { in php_libxml_node_free_resource()
1298 if (node->parent == NULL || node->type == XML_NAMESPACE_DECL) { in php_libxml_node_free_resource()
1299 php_libxml_node_free_list((xmlNodePtr) node->children); in php_libxml_node_free_resource()
1300 switch (node->type) { in php_libxml_node_free_resource()
1311 php_libxml_node_free_list((xmlNodePtr) node->properties); in php_libxml_node_free_resource()
1313 if (php_libxml_unregister_node(node) == 0) { in php_libxml_node_free_resource()
1314 node->doc = NULL; in php_libxml_node_free_resource()
1316 php_libxml_node_free(node); in php_libxml_node_free_resource()
1318 php_libxml_unregister_node(node); in php_libxml_node_free_resource()
1329 if (object != NULL && object->node != NULL) { in php_libxml_node_decrement_resource()
1330 obj_node = (php_libxml_node_ptr *) object->node; in php_libxml_node_decrement_resource()
1331 nodep = object->node->node; in php_libxml_node_decrement_resource()