summaryrefslogtreecommitdiff
path: root/ext/spl/spl_heap.c
diff options
context:
space:
mode:
authorAnatol Belski <ab@php.net>2014-08-16 11:37:14 +0200
committerAnatol Belski <ab@php.net>2014-08-16 11:37:14 +0200
commitcb25136f4ef1042295650475b2c20ace81e2b9b7 (patch)
tree9d6a509c80f2ac1e094cd9d42772654781a79715 /ext/spl/spl_heap.c
parentf790043e30513c56f108289ec44ea6eb493f7773 (diff)
downloadphp-git-cb25136f4ef1042295650475b2c20ace81e2b9b7.tar.gz
fix macros in the 5 basic extensions
Diffstat (limited to 'ext/spl/spl_heap.c')
-rw-r--r--ext/spl/spl_heap.c36
1 files changed, 18 insertions, 18 deletions
diff --git a/ext/spl/spl_heap.c b/ext/spl/spl_heap.c
index 90d78db6ee..90fa9af9ed 100644
--- a/ext/spl/spl_heap.c
+++ b/ext/spl/spl_heap.c
@@ -114,8 +114,8 @@ static int spl_ptr_heap_cmp_cb_helper(zval *object, spl_heap_object *heap_object
return FAILURE;
}
- convert_to_long(&zresult);
- *result = Z_LVAL(zresult);
+ convert_to_int(&zresult);
+ *result = Z_IVAL(zresult);
zval_ptr_dtor(&zresult);
@@ -165,7 +165,7 @@ static int spl_ptr_heap_zval_max_cmp(zval *a, zval *b, zval *object TSRMLS_DC) {
}
compare_function(&result, a, b TSRMLS_CC);
- return Z_LVAL(result);
+ return Z_IVAL(result);
}
/* }}} */
@@ -189,7 +189,7 @@ static int spl_ptr_heap_zval_min_cmp(zval *a, zval *b, zval *object TSRMLS_DC) {
}
compare_function(&result, b, a TSRMLS_CC);
- return Z_LVAL(result);
+ return Z_IVAL(result);
}
/* }}} */
@@ -220,7 +220,7 @@ static int spl_ptr_pqueue_zval_cmp(zval *a, zval *b, zval *object TSRMLS_DC) { /
}
compare_function(&result, a_priority_p, b_priority_p TSRMLS_CC);
- return Z_LVAL(result);
+ return Z_IVAL(result);
}
/* }}} */
@@ -493,8 +493,8 @@ static int spl_heap_object_count_elements(zval *object, long *count TSRMLS_DC) /
if (!Z_ISUNDEF(rv)) {
zval_ptr_dtor(&intern->retval);
ZVAL_ZVAL(&intern->retval, &rv, 0, 0);
- convert_to_long(&intern->retval);
- *count = (long) Z_LVAL(intern->retval);
+ convert_to_int(&intern->retval);
+ *count = (long) Z_IVAL(intern->retval);
return SUCCESS;
}
*count = 0;
@@ -529,7 +529,7 @@ static HashTable* spl_heap_object_get_debug_info_helper(zend_class_entry *ce, zv
zend_hash_copy(intern->debug_info, intern->std.properties, (copy_ctor_func_t) zval_add_ref);
pnstr = spl_gen_private_prop_name(ce, "flags", sizeof("flags")-1 TSRMLS_CC);
- ZVAL_LONG(&tmp, intern->flags);
+ ZVAL_INT(&tmp, intern->flags);
zend_hash_update(intern->debug_info, pnstr, &tmp);
STR_RELEASE(pnstr);
@@ -580,7 +580,7 @@ SPL_METHOD(SplHeap, count)
}
count = spl_ptr_heap_count(intern->heap);
- RETURN_LONG(count);
+ RETURN_INT(count);
}
/* }}} */
@@ -776,7 +776,7 @@ SPL_METHOD(SplPriorityQueue, setExtractFlags)
intern->flags = value & SPL_PQUEUE_EXTR_MASK;
- RETURN_LONG(intern->flags);
+ RETURN_INT(intern->flags);
}
/* }}} */
@@ -808,7 +808,7 @@ SPL_METHOD(SplPriorityQueue, compare)
return;
}
- RETURN_LONG(spl_ptr_heap_zval_max_cmp(a, b, NULL TSRMLS_CC));
+ RETURN_INT(spl_ptr_heap_zval_max_cmp(a, b, NULL TSRMLS_CC));
}
/* }}} */
@@ -851,7 +851,7 @@ SPL_METHOD(SplMinHeap, compare)
return;
}
- RETURN_LONG(spl_ptr_heap_zval_min_cmp(a, b, NULL TSRMLS_CC));
+ RETURN_INT(spl_ptr_heap_zval_min_cmp(a, b, NULL TSRMLS_CC));
}
/* }}} */
@@ -865,7 +865,7 @@ SPL_METHOD(SplMaxHeap, compare)
return;
}
- RETURN_LONG(spl_ptr_heap_zval_max_cmp(a, b, NULL TSRMLS_CC));
+ RETURN_INT(spl_ptr_heap_zval_max_cmp(a, b, NULL TSRMLS_CC));
}
/* }}} */
@@ -934,7 +934,7 @@ static void spl_heap_it_get_current_key(zend_object_iterator *iter, zval *key TS
{
spl_heap_object *object = Z_SPLHEAP_P(&iter->data);
- ZVAL_LONG(key, object->heap->count - 1);
+ ZVAL_INT(key, object->heap->count - 1);
}
/* }}} */
@@ -966,7 +966,7 @@ SPL_METHOD(SplHeap, key)
return;
}
- RETURN_LONG(intern->heap->count - 1);
+ RETURN_INT(intern->heap->count - 1);
}
/* }}} */
@@ -1226,9 +1226,9 @@ PHP_MINIT_FUNCTION(spl_heap) /* {{{ */
spl_ce_SplPriorityQueue->get_iterator = spl_pqueue_get_iterator;
- REGISTER_SPL_CLASS_CONST_LONG(SplPriorityQueue, "EXTR_BOTH", SPL_PQUEUE_EXTR_BOTH);
- REGISTER_SPL_CLASS_CONST_LONG(SplPriorityQueue, "EXTR_PRIORITY", SPL_PQUEUE_EXTR_PRIORITY);
- REGISTER_SPL_CLASS_CONST_LONG(SplPriorityQueue, "EXTR_DATA", SPL_PQUEUE_EXTR_DATA);
+ REGISTER_SPL_CLASS_CONST_INT(SplPriorityQueue, "EXTR_BOTH", SPL_PQUEUE_EXTR_BOTH);
+ REGISTER_SPL_CLASS_CONST_INT(SplPriorityQueue, "EXTR_PRIORITY", SPL_PQUEUE_EXTR_PRIORITY);
+ REGISTER_SPL_CLASS_CONST_INT(SplPriorityQueue, "EXTR_DATA", SPL_PQUEUE_EXTR_DATA);
return SUCCESS;
}