- Remove wrong inline usage (and fix bug #35796)

This commit is contained in:
foobar 2005-12-25 16:03:38 +00:00
parent 8864bf27e2
commit 6102ec3a06
4 changed files with 21 additions and 23 deletions

View File

@ -36,8 +36,6 @@
#include "spl_array.h"
#include "spl_exceptions.h"
#define INLINE inline
PHPAPI zend_class_entry *spl_ce_RecursiveIterator;
PHPAPI zend_class_entry *spl_ce_RecursiveIteratorIterator;
PHPAPI zend_class_entry *spl_ce_FilterIterator;
@ -831,9 +829,9 @@ int spl_dual_it_call_method(char *method, INTERNAL_FUNCTION_PARAMETERS)
}
#endif
static INLINE int spl_dual_it_fetch(spl_dual_it_object *intern, int check_more TSRMLS_DC);
static inline int spl_dual_it_fetch(spl_dual_it_object *intern, int check_more TSRMLS_DC);
static INLINE spl_dual_it_object* spl_dual_it_construct(INTERNAL_FUNCTION_PARAMETERS, zend_class_entry *ce_inner, dual_it_type dit_type)
static inline spl_dual_it_object* spl_dual_it_construct(INTERNAL_FUNCTION_PARAMETERS, zend_class_entry *ce_inner, dual_it_type dit_type)
{
zval *zobject, *retval;
spl_dual_it_object *intern;
@ -990,14 +988,14 @@ SPL_METHOD(dual_it, getInnerIterator)
}
} /* }}} */
static INLINE void spl_dual_it_require(spl_dual_it_object *intern TSRMLS_DC)
static inline void spl_dual_it_require(spl_dual_it_object *intern TSRMLS_DC)
{
if (!intern->inner.iterator) {
php_error_docref(NULL TSRMLS_CC, E_ERROR, "The inner constructor wasn't initialized with an iterator instance");
}
}
static INLINE void spl_dual_it_free(spl_dual_it_object *intern TSRMLS_DC)
static inline void spl_dual_it_free(spl_dual_it_object *intern TSRMLS_DC)
{
if (intern->inner.iterator && intern->inner.iterator->funcs->invalidate_current) {
intern->inner.iterator->funcs->invalidate_current(intern->inner.iterator TSRMLS_CC);
@ -1022,7 +1020,7 @@ static INLINE void spl_dual_it_free(spl_dual_it_object *intern TSRMLS_DC)
}
}
static INLINE void spl_dual_it_rewind(spl_dual_it_object *intern TSRMLS_DC)
static inline void spl_dual_it_rewind(spl_dual_it_object *intern TSRMLS_DC)
{
spl_dual_it_free(intern TSRMLS_CC);
intern->current.pos = 0;
@ -1031,13 +1029,13 @@ static INLINE void spl_dual_it_rewind(spl_dual_it_object *intern TSRMLS_DC)
}
}
static INLINE int spl_dual_it_valid(spl_dual_it_object *intern TSRMLS_DC)
static inline int spl_dual_it_valid(spl_dual_it_object *intern TSRMLS_DC)
{
/* FAILURE / SUCCESS */
return intern->inner.iterator->funcs->valid(intern->inner.iterator TSRMLS_CC);
}
static INLINE int spl_dual_it_fetch(spl_dual_it_object *intern, int check_more TSRMLS_DC)
static inline int spl_dual_it_fetch(spl_dual_it_object *intern, int check_more TSRMLS_DC)
{
zval **data;
@ -1057,7 +1055,7 @@ static INLINE int spl_dual_it_fetch(spl_dual_it_object *intern, int check_more T
return FAILURE;
}
static INLINE void spl_dual_it_next(spl_dual_it_object *intern, int do_free TSRMLS_DC)
static inline void spl_dual_it_next(spl_dual_it_object *intern, int do_free TSRMLS_DC)
{
if (do_free) {
spl_dual_it_free(intern TSRMLS_CC);
@ -1158,7 +1156,7 @@ SPL_METHOD(dual_it, next)
spl_dual_it_fetch(intern, 1 TSRMLS_CC);
} /* }}} */
static INLINE void spl_filter_it_fetch(zval *zthis, spl_dual_it_object *intern TSRMLS_DC)
static inline void spl_filter_it_fetch(zval *zthis, spl_dual_it_object *intern TSRMLS_DC)
{
zval *retval;
@ -1177,13 +1175,13 @@ static INLINE void spl_filter_it_fetch(zval *zthis, spl_dual_it_object *intern T
spl_dual_it_free(intern TSRMLS_CC);
}
static INLINE void spl_filter_it_rewind(zval *zthis, spl_dual_it_object *intern TSRMLS_DC)
static inline void spl_filter_it_rewind(zval *zthis, spl_dual_it_object *intern TSRMLS_DC)
{
spl_dual_it_rewind(intern TSRMLS_CC);
spl_filter_it_fetch(zthis, intern TSRMLS_CC);
}
static INLINE void spl_filter_it_next(zval *zthis, spl_dual_it_object *intern TSRMLS_DC)
static inline void spl_filter_it_next(zval *zthis, spl_dual_it_object *intern TSRMLS_DC)
{
spl_dual_it_next(intern, 1 TSRMLS_CC);
spl_filter_it_fetch(zthis, intern TSRMLS_CC);
@ -1336,7 +1334,7 @@ SPL_METHOD(RecursiveRegExIterator, __construct)
#endif
/* {{{ spl_dual_it_free_storage */
static INLINE void spl_dual_it_free_storage(void *_object TSRMLS_DC)
static inline void spl_dual_it_free_storage(void *_object TSRMLS_DC)
{
spl_dual_it_object *object = (spl_dual_it_object *)_object;
@ -1458,7 +1456,7 @@ static zend_function_entry spl_funcs_RecursiveRegExIterator[] = {
};
#endif
static INLINE int spl_limit_it_valid(spl_dual_it_object *intern TSRMLS_DC)
static inline int spl_limit_it_valid(spl_dual_it_object *intern TSRMLS_DC)
{
/* FAILURE / SUCCESS */
if (intern->u.limit.count != -1 && intern->current.pos >= intern->u.limit.offset + intern->u.limit.count) {
@ -1468,7 +1466,7 @@ static INLINE int spl_limit_it_valid(spl_dual_it_object *intern TSRMLS_DC)
}
}
static INLINE void spl_limit_it_seek(spl_dual_it_object *intern, long pos TSRMLS_DC)
static inline void spl_limit_it_seek(spl_dual_it_object *intern, long pos TSRMLS_DC)
{
zval *zpos;
@ -1610,17 +1608,17 @@ static zend_function_entry spl_funcs_LimitIterator[] = {
{NULL, NULL, NULL}
};
static INLINE int spl_caching_it_valid(spl_dual_it_object *intern TSRMLS_DC)
static inline int spl_caching_it_valid(spl_dual_it_object *intern TSRMLS_DC)
{
return intern->u.caching.flags & CIT_VALID ? SUCCESS : FAILURE;
}
static INLINE int spl_caching_it_has_next(spl_dual_it_object *intern TSRMLS_DC)
static inline int spl_caching_it_has_next(spl_dual_it_object *intern TSRMLS_DC)
{
return spl_dual_it_valid(intern TSRMLS_CC);
}
static INLINE void spl_caching_it_next(spl_dual_it_object *intern TSRMLS_DC)
static inline void spl_caching_it_next(spl_dual_it_object *intern TSRMLS_DC)
{
if (spl_dual_it_fetch(intern, 1 TSRMLS_CC) == SUCCESS) {
intern->u.caching.flags |= CIT_VALID;
@ -1678,7 +1676,7 @@ static INLINE void spl_caching_it_next(spl_dual_it_object *intern TSRMLS_DC)
}
}
static INLINE void spl_caching_it_rewind(spl_dual_it_object *intern TSRMLS_DC)
static inline void spl_caching_it_rewind(spl_dual_it_object *intern TSRMLS_DC)
{
spl_dual_it_rewind(intern TSRMLS_CC);
zend_hash_clean(HASH_OF(intern->u.caching.zcache));

View File

@ -3,7 +3,7 @@ SPL: ArrayIterator
--SKIPIF--
<?php if (!extension_loaded("spl")) print "skip"; ?>
--INI--
allow_call_time_pass_reference=1
error_reporting=2047
--FILE--
<?php

View File

@ -3,7 +3,7 @@ SPL: ArrayIterator without ArrayObject
--SKIPIF--
<?php if (!extension_loaded("spl")) print "skip"; ?>
--INI--
allow_call_time_pass_reference=1
error_reporting=2047
--FILE--
<?php

View File

@ -3,7 +3,7 @@ SPL: ArrayIterator and foreach reference
--SKIPIF--
<?php if (!extension_loaded("spl")) print "skip"; ?>
--INI--
allow_call_time_pass_reference=1
error_reporting=2047
--FILE--
<?php