summaryrefslogtreecommitdiff
path: root/ext/simplexml
diff options
context:
space:
mode:
authorFelipe Pena <felipe@php.net>2011-06-18 15:56:14 +0000
committerFelipe Pena <felipe@php.net>2011-06-18 15:56:14 +0000
commitebf9db550f7bf62c597e8bcda850b32934560f01 (patch)
treecac96fcc73f009dcb0c43d6793851b6219acd0d4 /ext/simplexml
parente63f59191d972127ca2f08a8683ade69eb46e7d7 (diff)
downloadphp-git-ebf9db550f7bf62c597e8bcda850b32934560f01.tar.gz
- Added missing arginfos for void params and void param checks
Diffstat (limited to 'ext/simplexml')
-rwxr-xr-xext/simplexml/sxe.c47
1 files changed, 40 insertions, 7 deletions
diff --git a/ext/simplexml/sxe.c b/ext/simplexml/sxe.c
index e6abf54dc1..527c35b655 100755
--- a/ext/simplexml/sxe.c
+++ b/ext/simplexml/sxe.c
@@ -41,6 +41,10 @@ zend_class_entry *ce_SimpleXMLElement;
PHP_METHOD(ce_SimpleXMLIterator, rewind)
{
php_sxe_iterator iter;
+
+ if (zend_parse_parameters_none() == FAILURE) {
+ return;
+ }
iter.sxe = php_sxe_fetch_object(getThis() TSRMLS_CC);
ce_SimpleXMLElement->iterator_funcs.funcs->rewind((zend_object_iterator*)&iter TSRMLS_CC);
@@ -52,6 +56,10 @@ PHP_METHOD(ce_SimpleXMLIterator, rewind)
PHP_METHOD(ce_SimpleXMLIterator, valid)
{
php_sxe_object *sxe = php_sxe_fetch_object(getThis() TSRMLS_CC);
+
+ if (zend_parse_parameters_none() == FAILURE) {
+ return;
+ }
RETURN_BOOL(sxe->iter.data);
}
@@ -62,6 +70,10 @@ PHP_METHOD(ce_SimpleXMLIterator, valid)
PHP_METHOD(ce_SimpleXMLIterator, current)
{
php_sxe_object *sxe = php_sxe_fetch_object(getThis() TSRMLS_CC);
+
+ if (zend_parse_parameters_none() == FAILURE) {
+ return;
+ }
if (!sxe->iter.data) {
return; /* return NULL */
@@ -78,6 +90,10 @@ PHP_METHOD(ce_SimpleXMLIterator, key)
xmlNodePtr curnode;
php_sxe_object *intern;
php_sxe_object *sxe = php_sxe_fetch_object(getThis() TSRMLS_CC);
+
+ if (zend_parse_parameters_none() == FAILURE) {
+ return;
+ }
if (!sxe->iter.data) {
RETURN_FALSE;
@@ -98,6 +114,10 @@ PHP_METHOD(ce_SimpleXMLIterator, key)
PHP_METHOD(ce_SimpleXMLIterator, next)
{
php_sxe_iterator iter;
+
+ if (zend_parse_parameters_none() == FAILURE) {
+ return;
+ }
iter.sxe = php_sxe_fetch_object(getThis() TSRMLS_CC);
ce_SimpleXMLElement->iterator_funcs.funcs->move_forward((zend_object_iterator*)&iter TSRMLS_CC);
@@ -111,6 +131,10 @@ PHP_METHOD(ce_SimpleXMLIterator, hasChildren)
php_sxe_object *sxe = php_sxe_fetch_object(getThis() TSRMLS_CC);
php_sxe_object *child;
xmlNodePtr node;
+
+ if (zend_parse_parameters_none() == FAILURE) {
+ return;
+ }
if (!sxe->iter.data || sxe->iter.type == SXE_ITER_ATTRLIST) {
RETURN_FALSE;
@@ -133,6 +157,10 @@ PHP_METHOD(ce_SimpleXMLIterator, hasChildren)
PHP_METHOD(ce_SimpleXMLIterator, getChildren)
{
php_sxe_object *sxe = php_sxe_fetch_object(getThis() TSRMLS_CC);
+
+ if (zend_parse_parameters_none() == FAILURE) {
+ return;
+ }
if (!sxe->iter.data || sxe->iter.type == SXE_ITER_ATTRLIST) {
return; /* return NULL */
@@ -140,14 +168,19 @@ PHP_METHOD(ce_SimpleXMLIterator, getChildren)
RETURN_ZVAL(sxe->iter.data, 1, 0);
}
+/* {{{ arginfo */
+ZEND_BEGIN_ARG_INFO(arginfo_simplexmliterator__void, 0)
+ZEND_END_ARG_INFO()
+/* }}} */
+
static const zend_function_entry funcs_SimpleXMLIterator[] = {
- PHP_ME(ce_SimpleXMLIterator, rewind, NULL, ZEND_ACC_PUBLIC)
- PHP_ME(ce_SimpleXMLIterator, valid, NULL, ZEND_ACC_PUBLIC)
- PHP_ME(ce_SimpleXMLIterator, current, NULL, ZEND_ACC_PUBLIC)
- PHP_ME(ce_SimpleXMLIterator, key, NULL, ZEND_ACC_PUBLIC)
- PHP_ME(ce_SimpleXMLIterator, next, NULL, ZEND_ACC_PUBLIC)
- PHP_ME(ce_SimpleXMLIterator, hasChildren, NULL, ZEND_ACC_PUBLIC)
- PHP_ME(ce_SimpleXMLIterator, getChildren, NULL, ZEND_ACC_PUBLIC)
+ PHP_ME(ce_SimpleXMLIterator, rewind, arginfo_simplexmliterator__void, ZEND_ACC_PUBLIC)
+ PHP_ME(ce_SimpleXMLIterator, valid, arginfo_simplexmliterator__void, ZEND_ACC_PUBLIC)
+ PHP_ME(ce_SimpleXMLIterator, current, arginfo_simplexmliterator__void, ZEND_ACC_PUBLIC)
+ PHP_ME(ce_SimpleXMLIterator, key, arginfo_simplexmliterator__void, ZEND_ACC_PUBLIC)
+ PHP_ME(ce_SimpleXMLIterator, next, arginfo_simplexmliterator__void, ZEND_ACC_PUBLIC)
+ PHP_ME(ce_SimpleXMLIterator, hasChildren, arginfo_simplexmliterator__void, ZEND_ACC_PUBLIC)
+ PHP_ME(ce_SimpleXMLIterator, getChildren, arginfo_simplexmliterator__void, ZEND_ACC_PUBLIC)
{NULL, NULL, NULL}
};
/* }}} */