@@ -1291,9 +1291,9 @@ PHP_LIBXML_API xmlNodePtr php_libxml_import_node(zval *object)
1291
1291
return node ;
1292
1292
}
1293
1293
1294
- PHP_LIBXML_API int php_libxml_increment_node_ptr (php_libxml_node_object * object , xmlNodePtr node , void * private_data )
1294
+ PHP_LIBXML_API unsigned int php_libxml_increment_node_ptr (php_libxml_node_object * object , xmlNodePtr node , void * private_data )
1295
1295
{
1296
- int ret_refcount = -1 ;
1296
+ unsigned int ret_refcount = 0 ;
1297
1297
1298
1298
if (object != NULL && node != NULL ) {
1299
1299
if (object -> node != NULL ) {
@@ -1323,11 +1323,11 @@ PHP_LIBXML_API int php_libxml_increment_node_ptr(php_libxml_node_object *object,
1323
1323
return ret_refcount ;
1324
1324
}
1325
1325
1326
- PHP_LIBXML_API int php_libxml_decrement_node_ptr_ref (php_libxml_node_ptr * ptr )
1326
+ PHP_LIBXML_API unsigned int php_libxml_decrement_node_ptr_ref (php_libxml_node_ptr * ptr )
1327
1327
{
1328
1328
ZEND_ASSERT (ptr != NULL );
1329
1329
1330
- int ret_refcount = -- ptr -> refcount ;
1330
+ unsigned int ret_refcount = -- ptr -> refcount ;
1331
1331
if (ret_refcount == 0 ) {
1332
1332
if (ptr -> node != NULL ) {
1333
1333
ptr -> node -> _private = NULL ;
@@ -1341,17 +1341,17 @@ PHP_LIBXML_API int php_libxml_decrement_node_ptr_ref(php_libxml_node_ptr *ptr)
1341
1341
return ret_refcount ;
1342
1342
}
1343
1343
1344
- PHP_LIBXML_API int php_libxml_decrement_node_ptr (php_libxml_node_object * object )
1344
+ PHP_LIBXML_API unsigned int php_libxml_decrement_node_ptr (php_libxml_node_object * object )
1345
1345
{
1346
1346
if (object != NULL && object -> node != NULL ) {
1347
1347
return php_libxml_decrement_node_ptr_ref (object -> node );
1348
1348
}
1349
- return -1 ;
1349
+ return 0 ;
1350
1350
}
1351
1351
1352
- PHP_LIBXML_API int php_libxml_increment_doc_ref (php_libxml_node_object * object , xmlDocPtr docp )
1352
+ PHP_LIBXML_API unsigned int php_libxml_increment_doc_ref (php_libxml_node_object * object , xmlDocPtr docp )
1353
1353
{
1354
- int ret_refcount = -1 ;
1354
+ unsigned int ret_refcount = 0 ;
1355
1355
1356
1356
if (object -> document != NULL ) {
1357
1357
object -> document -> refcount ++ ;
@@ -1372,9 +1372,9 @@ PHP_LIBXML_API int php_libxml_increment_doc_ref(php_libxml_node_object *object,
1372
1372
return ret_refcount ;
1373
1373
}
1374
1374
1375
- PHP_LIBXML_API int php_libxml_decrement_doc_ref_directly (php_libxml_ref_obj * document )
1375
+ PHP_LIBXML_API unsigned int php_libxml_decrement_doc_ref_directly (php_libxml_ref_obj * document )
1376
1376
{
1377
- int ret_refcount = -- document -> refcount ;
1377
+ unsigned int ret_refcount = -- document -> refcount ;
1378
1378
if (ret_refcount == 0 ) {
1379
1379
if (document -> private_data != NULL ) {
1380
1380
document -> private_data -> dtor (document -> private_data );
@@ -1395,9 +1395,9 @@ PHP_LIBXML_API int php_libxml_decrement_doc_ref_directly(php_libxml_ref_obj *doc
1395
1395
return ret_refcount ;
1396
1396
}
1397
1397
1398
- PHP_LIBXML_API int php_libxml_decrement_doc_ref (php_libxml_node_object * object )
1398
+ PHP_LIBXML_API unsigned int php_libxml_decrement_doc_ref (php_libxml_node_object * object )
1399
1399
{
1400
- int ret_refcount = -1 ;
1400
+ unsigned int ret_refcount = 0 ;
1401
1401
1402
1402
if (object != NULL && object -> document != NULL ) {
1403
1403
ret_refcount = php_libxml_decrement_doc_ref_directly (object -> document );
@@ -1445,7 +1445,7 @@ PHP_LIBXML_API void php_libxml_node_decrement_resource(php_libxml_node_object *o
1445
1445
if (object != NULL && object -> node != NULL ) {
1446
1446
php_libxml_node_ptr * obj_node = (php_libxml_node_ptr * ) object -> node ;
1447
1447
xmlNodePtr nodep = obj_node -> node ;
1448
- int ret_refcount = php_libxml_decrement_node_ptr (object );
1448
+ unsigned int ret_refcount = php_libxml_decrement_node_ptr (object );
1449
1449
if (ret_refcount == 0 ) {
1450
1450
php_libxml_node_free_resource (nodep );
1451
1451
} else {
0 commit comments