mirror of
https://github.com/php/php-src.git
synced 2024-09-21 18:07:23 +00:00
- Complete change to create_function()
This commit is contained in:
parent
cd9e047d65
commit
f8983e467f
@ -804,7 +804,7 @@ ZEND_FUNCTION(get_declared_classes)
|
||||
|
||||
#define LAMBDA_TEMP_FUNCNAME "__lambda_func"
|
||||
|
||||
/* {{{ proto string lambda(string args, string code)
|
||||
/* {{{ proto string create_function(string args, string code)
|
||||
Creates an anonymous function, and returns its name (funny, eh?) */
|
||||
ZEND_FUNCTION(create_function)
|
||||
{
|
||||
@ -836,7 +836,7 @@ ZEND_FUNCTION(create_function)
|
||||
zend_function *func;
|
||||
|
||||
if (zend_hash_find(EG(function_table), LAMBDA_TEMP_FUNCNAME, sizeof(LAMBDA_TEMP_FUNCNAME), (void **) &func)==FAILURE) {
|
||||
zend_error(E_ERROR, "Unexpected inconsistency in lambda()");
|
||||
zend_error(E_ERROR, "Unexpected inconsistency in create_function()");
|
||||
RETURN_FALSE;
|
||||
}
|
||||
function_add_ref(func);
|
||||
@ -853,4 +853,4 @@ ZEND_FUNCTION(create_function)
|
||||
RETURN_FALSE;
|
||||
}
|
||||
}
|
||||
/* }}} */
|
||||
/* }}} */
|
||||
|
Loading…
Reference in New Issue
Block a user