Lines Matching refs:node

174 			if (nodeptr->node != NULL && nodeptr->node->type != XML_DOCUMENT_NODE) {  in php_libxml_unregister_node()
175 nodeptr->node->_private = NULL; in php_libxml_unregister_node()
177 nodeptr->node = NULL; in php_libxml_unregister_node()
184 static void php_libxml_node_free(xmlNodePtr node) in php_libxml_node_free() argument
186 if(node) { in php_libxml_node_free()
187 if (node->_private != NULL) { in php_libxml_node_free()
188 ((php_libxml_node_ptr *) node->_private)->node = NULL; in php_libxml_node_free()
190 switch (node->type) { in php_libxml_node_free()
192 xmlFreeProp((xmlAttrPtr) node); in php_libxml_node_free()
200 if (node->name != NULL) { in php_libxml_node_free()
201 xmlFree((char *) node->name); in php_libxml_node_free()
203 if (((xmlEntityPtr) node)->ExternalID != NULL) { in php_libxml_node_free()
204 xmlFree((char *) ((xmlEntityPtr) node)->ExternalID); in php_libxml_node_free()
206 if (((xmlEntityPtr) node)->SystemID != NULL) { in php_libxml_node_free()
207 xmlFree((char *) ((xmlEntityPtr) node)->SystemID); in php_libxml_node_free()
209 xmlFree(node); in php_libxml_node_free()
212 if (node->ns) { in php_libxml_node_free()
213 xmlFreeNs(node->ns); in php_libxml_node_free()
214 node->ns = NULL; in php_libxml_node_free()
216 node->type = XML_ELEMENT_NODE; in php_libxml_node_free()
218 xmlFreeNode(node); in php_libxml_node_free()
223 static void php_libxml_node_free_list(xmlNodePtr node TSRMLS_DC) in php_libxml_node_free_list()
227 if (node != NULL) { in php_libxml_node_free_list()
228 curnode = node; in php_libxml_node_free_list()
230 node = curnode; in php_libxml_node_free_list()
231 switch (node->type) { in php_libxml_node_free_list()
237 php_libxml_node_free_list((xmlNodePtr) node->properties TSRMLS_CC); in php_libxml_node_free_list()
240 if ((node->doc != NULL) && (((xmlAttrPtr) node)->atype == XML_ATTRIBUTE_ID)) { in php_libxml_node_free_list()
241 xmlRemoveID(node->doc, (xmlAttrPtr) node); in php_libxml_node_free_list()
248 php_libxml_node_free_list(node->children TSRMLS_CC); in php_libxml_node_free_list()
251 php_libxml_node_free_list(node->children TSRMLS_CC); in php_libxml_node_free_list()
252 php_libxml_node_free_list((xmlNodePtr) node->properties TSRMLS_CC); in php_libxml_node_free_list()
255 curnode = node->next; in php_libxml_node_free_list()
256 xmlUnlinkNode(node); in php_libxml_node_free_list()
257 if (php_libxml_unregister_node(node TSRMLS_CC) == 0) { in php_libxml_node_free_list()
258 node->doc = NULL; in php_libxml_node_free_list()
260 php_libxml_node_free(node); in php_libxml_node_free_list()
488 error_copy.node = NULL; in _php_list_set_error_structure()
1171 xmlNodePtr node = NULL; in php_libxml_import_node() local
1180 node = export_hnd->export_func(object TSRMLS_CC); in php_libxml_import_node()
1183 return node; in php_libxml_import_node()
1186 PHP_LIBXML_API int php_libxml_increment_node_ptr(php_libxml_node_object *object, xmlNodePtr node, v… in php_libxml_increment_node_ptr() argument
1190 if (object != NULL && node != NULL) { in php_libxml_increment_node_ptr()
1191 if (object->node != NULL) { in php_libxml_increment_node_ptr()
1192 if (object->node->node == node) { in php_libxml_increment_node_ptr()
1193 return object->node->refcount; in php_libxml_increment_node_ptr()
1198 if (node->_private != NULL) { in php_libxml_increment_node_ptr()
1199 object->node = node->_private; in php_libxml_increment_node_ptr()
1200 ret_refcount = ++object->node->refcount; in php_libxml_increment_node_ptr()
1202 if (object->node->_private == NULL) { in php_libxml_increment_node_ptr()
1203 object->node->_private = private_data; in php_libxml_increment_node_ptr()
1207 object->node = emalloc(sizeof(php_libxml_node_ptr)); in php_libxml_increment_node_ptr()
1208 object->node->node = node; in php_libxml_increment_node_ptr()
1209 object->node->refcount = 1; in php_libxml_increment_node_ptr()
1210 object->node->_private = private_data; in php_libxml_increment_node_ptr()
1211 node->_private = object->node; in php_libxml_increment_node_ptr()
1223 if (object != NULL && object->node != NULL) { in php_libxml_decrement_node_ptr()
1224 obj_node = (php_libxml_node_ptr *) object->node; in php_libxml_decrement_node_ptr()
1227 if (obj_node->node != NULL) { in php_libxml_decrement_node_ptr()
1228 obj_node->node->_private = NULL; in php_libxml_decrement_node_ptr()
1232 object->node = NULL; in php_libxml_decrement_node_ptr()
1281 PHP_LIBXML_API void php_libxml_node_free_resource(xmlNodePtr node TSRMLS_DC) in php_libxml_node_free_resource()
1283 if (!node) { in php_libxml_node_free_resource()
1287 switch (node->type) { in php_libxml_node_free_resource()
1292 if (node->parent == NULL || node->type == XML_NAMESPACE_DECL) { in php_libxml_node_free_resource()
1293 php_libxml_node_free_list((xmlNodePtr) node->children TSRMLS_CC); in php_libxml_node_free_resource()
1294 switch (node->type) { in php_libxml_node_free_resource()
1305 php_libxml_node_free_list((xmlNodePtr) node->properties TSRMLS_CC); in php_libxml_node_free_resource()
1307 if (php_libxml_unregister_node(node TSRMLS_CC) == 0) { in php_libxml_node_free_resource()
1308 node->doc = NULL; in php_libxml_node_free_resource()
1310 php_libxml_node_free(node); in php_libxml_node_free_resource()
1312 php_libxml_unregister_node(node TSRMLS_CC); in php_libxml_node_free_resource()
1323 if (object != NULL && object->node != NULL) { in php_libxml_node_decrement_resource()
1324 obj_node = (php_libxml_node_ptr *) object->node; in php_libxml_node_decrement_resource()
1325 nodep = object->node->node; in php_libxml_node_decrement_resource()