mirror of
https://github.com/php/php-src.git
synced 2025-08-16 05:58:45 +02:00
MFH: Nuke php3 legacy
This commit is contained in:
parent
f20a62b164
commit
d0a54af4c5
22 changed files with 91 additions and 91 deletions
|
@ -184,7 +184,7 @@ static void php_reg_eprint(int err, regex_t *re) {
|
||||||
*/
|
*/
|
||||||
static void php_ereg(INTERNAL_FUNCTION_PARAMETERS, int icase)
|
static void php_ereg(INTERNAL_FUNCTION_PARAMETERS, int icase)
|
||||||
{
|
{
|
||||||
pval **regex, /* Regular expression */
|
zval **regex, /* Regular expression */
|
||||||
**findin, /* String to apply expression to */
|
**findin, /* String to apply expression to */
|
||||||
**array = NULL; /* Optional register array */
|
**array = NULL; /* Optional register array */
|
||||||
regex_t re;
|
regex_t re;
|
||||||
|
@ -442,7 +442,7 @@ PHPAPI char *php_reg_replace(const char *pattern, const char *replace, const cha
|
||||||
*/
|
*/
|
||||||
static void php_ereg_replace(INTERNAL_FUNCTION_PARAMETERS, int icase)
|
static void php_ereg_replace(INTERNAL_FUNCTION_PARAMETERS, int icase)
|
||||||
{
|
{
|
||||||
pval **arg_pattern,
|
zval **arg_pattern,
|
||||||
**arg_replace,
|
**arg_replace,
|
||||||
**arg_string;
|
**arg_string;
|
||||||
char *pattern;
|
char *pattern;
|
||||||
|
|
|
@ -355,15 +355,15 @@ static int array_data_compare(const void *a, const void *b TSRMLS_DC)
|
||||||
{
|
{
|
||||||
Bucket *f;
|
Bucket *f;
|
||||||
Bucket *s;
|
Bucket *s;
|
||||||
pval result;
|
zval result;
|
||||||
pval *first;
|
zval *first;
|
||||||
pval *second;
|
zval *second;
|
||||||
|
|
||||||
f = *((Bucket **) a);
|
f = *((Bucket **) a);
|
||||||
s = *((Bucket **) b);
|
s = *((Bucket **) b);
|
||||||
|
|
||||||
first = *((pval **) f->pData);
|
first = *((zval **) f->pData);
|
||||||
second = *((pval **) s->pData);
|
second = *((zval **) s->pData);
|
||||||
|
|
||||||
if (ARRAYG(compare_func)(&result, first, second TSRMLS_CC) == FAILURE) {
|
if (ARRAYG(compare_func)(&result, first, second TSRMLS_CC) == FAILURE) {
|
||||||
return 0;
|
return 0;
|
||||||
|
@ -405,8 +405,8 @@ static int array_natural_general_compare(const void *a, const void *b, int fold_
|
||||||
f = *((Bucket **) a);
|
f = *((Bucket **) a);
|
||||||
s = *((Bucket **) b);
|
s = *((Bucket **) b);
|
||||||
|
|
||||||
fval = *((pval **) f->pData);
|
fval = *((zval **) f->pData);
|
||||||
sval = *((pval **) s->pData);
|
sval = *((zval **) s->pData);
|
||||||
first = *fval;
|
first = *fval;
|
||||||
second = *sval;
|
second = *sval;
|
||||||
if (Z_TYPE_P(fval) != IS_STRING) {
|
if (Z_TYPE_P(fval) != IS_STRING) {
|
||||||
|
@ -711,9 +711,9 @@ static int array_user_key_compare(const void *a, const void *b TSRMLS_DC)
|
||||||
{
|
{
|
||||||
Bucket *f;
|
Bucket *f;
|
||||||
Bucket *s;
|
Bucket *s;
|
||||||
pval key1, key2;
|
zval key1, key2;
|
||||||
pval *args[2];
|
zval *args[2];
|
||||||
pval retval;
|
zval retval;
|
||||||
int status;
|
int status;
|
||||||
|
|
||||||
args[0] = &key1;
|
args[0] = &key1;
|
||||||
|
@ -794,7 +794,7 @@ PHP_FUNCTION(uksort)
|
||||||
Advances array argument's internal pointer to the last element and return it */
|
Advances array argument's internal pointer to the last element and return it */
|
||||||
PHP_FUNCTION(end)
|
PHP_FUNCTION(end)
|
||||||
{
|
{
|
||||||
pval **array, **entry;
|
zval **array, **entry;
|
||||||
HashTable *target_hash;
|
HashTable *target_hash;
|
||||||
|
|
||||||
if (ZEND_NUM_ARGS() != 1 || zend_get_parameters_ex(1, &array) == FAILURE) {
|
if (ZEND_NUM_ARGS() != 1 || zend_get_parameters_ex(1, &array) == FAILURE) {
|
||||||
|
@ -821,7 +821,7 @@ PHP_FUNCTION(end)
|
||||||
Move array argument's internal pointer to the previous element and return it */
|
Move array argument's internal pointer to the previous element and return it */
|
||||||
PHP_FUNCTION(prev)
|
PHP_FUNCTION(prev)
|
||||||
{
|
{
|
||||||
pval **array, **entry;
|
zval **array, **entry;
|
||||||
HashTable *target_hash;
|
HashTable *target_hash;
|
||||||
|
|
||||||
if (ZEND_NUM_ARGS() != 1 || zend_get_parameters_ex(1, &array) == FAILURE) {
|
if (ZEND_NUM_ARGS() != 1 || zend_get_parameters_ex(1, &array) == FAILURE) {
|
||||||
|
@ -848,7 +848,7 @@ PHP_FUNCTION(prev)
|
||||||
Move array argument's internal pointer to the next element and return it */
|
Move array argument's internal pointer to the next element and return it */
|
||||||
PHP_FUNCTION(next)
|
PHP_FUNCTION(next)
|
||||||
{
|
{
|
||||||
pval **array, **entry;
|
zval **array, **entry;
|
||||||
HashTable *target_hash;
|
HashTable *target_hash;
|
||||||
|
|
||||||
if (ZEND_NUM_ARGS() != 1 || zend_get_parameters_ex(1, &array) == FAILURE) {
|
if (ZEND_NUM_ARGS() != 1 || zend_get_parameters_ex(1, &array) == FAILURE) {
|
||||||
|
@ -875,7 +875,7 @@ PHP_FUNCTION(next)
|
||||||
Set array argument's internal pointer to the first element and return it */
|
Set array argument's internal pointer to the first element and return it */
|
||||||
PHP_FUNCTION(reset)
|
PHP_FUNCTION(reset)
|
||||||
{
|
{
|
||||||
pval **array, **entry;
|
zval **array, **entry;
|
||||||
HashTable *target_hash;
|
HashTable *target_hash;
|
||||||
|
|
||||||
if (ZEND_NUM_ARGS() != 1 || zend_get_parameters_ex(1, &array) == FAILURE) {
|
if (ZEND_NUM_ARGS() != 1 || zend_get_parameters_ex(1, &array) == FAILURE) {
|
||||||
|
@ -902,7 +902,7 @@ PHP_FUNCTION(reset)
|
||||||
Return the element currently pointed to by the internal array pointer */
|
Return the element currently pointed to by the internal array pointer */
|
||||||
PHP_FUNCTION(current)
|
PHP_FUNCTION(current)
|
||||||
{
|
{
|
||||||
pval **array, **entry;
|
zval **array, **entry;
|
||||||
HashTable *target_hash;
|
HashTable *target_hash;
|
||||||
|
|
||||||
if (ZEND_NUM_ARGS() != 1 || zend_get_parameters_ex(1, &array) == FAILURE) {
|
if (ZEND_NUM_ARGS() != 1 || zend_get_parameters_ex(1, &array) == FAILURE) {
|
||||||
|
@ -924,7 +924,7 @@ PHP_FUNCTION(current)
|
||||||
Return the key of the element currently pointed to by the internal array pointer */
|
Return the key of the element currently pointed to by the internal array pointer */
|
||||||
PHP_FUNCTION(key)
|
PHP_FUNCTION(key)
|
||||||
{
|
{
|
||||||
pval **array;
|
zval **array;
|
||||||
char *string_key;
|
char *string_key;
|
||||||
uint string_length;
|
uint string_length;
|
||||||
ulong num_key;
|
ulong num_key;
|
||||||
|
@ -956,7 +956,7 @@ PHP_FUNCTION(key)
|
||||||
PHP_FUNCTION(min)
|
PHP_FUNCTION(min)
|
||||||
{
|
{
|
||||||
int argc=ZEND_NUM_ARGS();
|
int argc=ZEND_NUM_ARGS();
|
||||||
pval **result;
|
zval **result;
|
||||||
|
|
||||||
if (argc<=0) {
|
if (argc<=0) {
|
||||||
php_error_docref(NULL TSRMLS_CC, E_WARNING, "Atleast one value should be passed");
|
php_error_docref(NULL TSRMLS_CC, E_WARNING, "Atleast one value should be passed");
|
||||||
|
@ -964,7 +964,7 @@ PHP_FUNCTION(min)
|
||||||
}
|
}
|
||||||
set_compare_func(SORT_REGULAR TSRMLS_CC);
|
set_compare_func(SORT_REGULAR TSRMLS_CC);
|
||||||
if (argc == 1) {
|
if (argc == 1) {
|
||||||
pval **arr;
|
zval **arr;
|
||||||
|
|
||||||
if (zend_get_parameters_ex(1, &arr) == FAILURE || Z_TYPE_PP(arr) != IS_ARRAY) {
|
if (zend_get_parameters_ex(1, &arr) == FAILURE || Z_TYPE_PP(arr) != IS_ARRAY) {
|
||||||
WRONG_PARAM_COUNT;
|
WRONG_PARAM_COUNT;
|
||||||
|
@ -976,8 +976,8 @@ PHP_FUNCTION(min)
|
||||||
RETURN_FALSE;
|
RETURN_FALSE;
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
pval ***args = (pval ***) safe_emalloc(sizeof(pval **), ZEND_NUM_ARGS(), 0);
|
zval ***args = (zval ***) safe_emalloc(sizeof(zval **), ZEND_NUM_ARGS(), 0);
|
||||||
pval **min, result;
|
zval **min, result;
|
||||||
int i;
|
int i;
|
||||||
|
|
||||||
if (zend_get_parameters_array_ex(ZEND_NUM_ARGS(), args)==FAILURE) {
|
if (zend_get_parameters_array_ex(ZEND_NUM_ARGS(), args)==FAILURE) {
|
||||||
|
@ -1006,7 +1006,7 @@ PHP_FUNCTION(min)
|
||||||
PHP_FUNCTION(max)
|
PHP_FUNCTION(max)
|
||||||
{
|
{
|
||||||
int argc=ZEND_NUM_ARGS();
|
int argc=ZEND_NUM_ARGS();
|
||||||
pval **result;
|
zval **result;
|
||||||
|
|
||||||
if (argc<=0) {
|
if (argc<=0) {
|
||||||
php_error_docref(NULL TSRMLS_CC, E_WARNING, "Atleast one value should be passed");
|
php_error_docref(NULL TSRMLS_CC, E_WARNING, "Atleast one value should be passed");
|
||||||
|
@ -1014,7 +1014,7 @@ PHP_FUNCTION(max)
|
||||||
}
|
}
|
||||||
set_compare_func(SORT_REGULAR TSRMLS_CC);
|
set_compare_func(SORT_REGULAR TSRMLS_CC);
|
||||||
if (argc == 1) {
|
if (argc == 1) {
|
||||||
pval **arr;
|
zval **arr;
|
||||||
|
|
||||||
if (zend_get_parameters_ex(1, &arr) == FAILURE || Z_TYPE_PP(arr) != IS_ARRAY) {
|
if (zend_get_parameters_ex(1, &arr) == FAILURE || Z_TYPE_PP(arr) != IS_ARRAY) {
|
||||||
WRONG_PARAM_COUNT;
|
WRONG_PARAM_COUNT;
|
||||||
|
@ -1026,8 +1026,8 @@ PHP_FUNCTION(max)
|
||||||
RETURN_FALSE;
|
RETURN_FALSE;
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
pval ***args = (pval ***) safe_emalloc(sizeof(pval **), ZEND_NUM_ARGS(), 0);
|
zval ***args = (zval ***) safe_emalloc(sizeof(zval **), ZEND_NUM_ARGS(), 0);
|
||||||
pval **max, result;
|
zval **max, result;
|
||||||
int i;
|
int i;
|
||||||
|
|
||||||
if (zend_get_parameters_array_ex(ZEND_NUM_ARGS(), args) == FAILURE) {
|
if (zend_get_parameters_array_ex(ZEND_NUM_ARGS(), args) == FAILURE) {
|
||||||
|
|
|
@ -217,7 +217,7 @@ PHP_FUNCTION(assert)
|
||||||
|
|
||||||
PHP_FUNCTION(assert_options)
|
PHP_FUNCTION(assert_options)
|
||||||
{
|
{
|
||||||
pval **what, **value;
|
zval **what, **value;
|
||||||
int oldint;
|
int oldint;
|
||||||
int ac = ZEND_NUM_ARGS();
|
int ac = ZEND_NUM_ARGS();
|
||||||
|
|
||||||
|
|
|
@ -163,7 +163,7 @@ static void user_tick_function_dtor(user_tick_function_entry *tick_function_entr
|
||||||
|
|
||||||
#undef sprintf
|
#undef sprintf
|
||||||
|
|
||||||
function_entry basic_functions[] = {
|
zend_function_entry basic_functions[] = {
|
||||||
PHP_FE(constant, NULL)
|
PHP_FE(constant, NULL)
|
||||||
PHP_FE(bin2hex, NULL)
|
PHP_FE(bin2hex, NULL)
|
||||||
PHP_FE(sleep, NULL)
|
PHP_FE(sleep, NULL)
|
||||||
|
@ -1430,7 +1430,7 @@ PHP_FUNCTION(getenv)
|
||||||
Set the value of an environment variable */
|
Set the value of an environment variable */
|
||||||
PHP_FUNCTION(putenv)
|
PHP_FUNCTION(putenv)
|
||||||
{
|
{
|
||||||
pval **str;
|
zval **str;
|
||||||
|
|
||||||
if (ZEND_NUM_ARGS() != 1 || zend_get_parameters_ex(1, &str) == FAILURE) {
|
if (ZEND_NUM_ARGS() != 1 || zend_get_parameters_ex(1, &str) == FAILURE) {
|
||||||
WRONG_PARAM_COUNT;
|
WRONG_PARAM_COUNT;
|
||||||
|
@ -1726,7 +1726,7 @@ PHP_FUNCTION(flush)
|
||||||
Delay for a given number of seconds */
|
Delay for a given number of seconds */
|
||||||
PHP_FUNCTION(sleep)
|
PHP_FUNCTION(sleep)
|
||||||
{
|
{
|
||||||
pval **num;
|
zval **num;
|
||||||
|
|
||||||
if (ZEND_NUM_ARGS() != 1 || zend_get_parameters_ex(1, &num) == FAILURE) {
|
if (ZEND_NUM_ARGS() != 1 || zend_get_parameters_ex(1, &num) == FAILURE) {
|
||||||
WRONG_PARAM_COUNT;
|
WRONG_PARAM_COUNT;
|
||||||
|
@ -1747,7 +1747,7 @@ PHP_FUNCTION(sleep)
|
||||||
PHP_FUNCTION(usleep)
|
PHP_FUNCTION(usleep)
|
||||||
{
|
{
|
||||||
#if HAVE_USLEEP
|
#if HAVE_USLEEP
|
||||||
pval **num;
|
zval **num;
|
||||||
|
|
||||||
if (ZEND_NUM_ARGS() != 1 || zend_get_parameters_ex(1, &num) == FAILURE) {
|
if (ZEND_NUM_ARGS() != 1 || zend_get_parameters_ex(1, &num) == FAILURE) {
|
||||||
WRONG_PARAM_COUNT;
|
WRONG_PARAM_COUNT;
|
||||||
|
@ -1846,7 +1846,7 @@ PHP_FUNCTION(get_current_user)
|
||||||
Get the value of a PHP configuration option */
|
Get the value of a PHP configuration option */
|
||||||
PHP_FUNCTION(get_cfg_var)
|
PHP_FUNCTION(get_cfg_var)
|
||||||
{
|
{
|
||||||
pval **varname;
|
zval **varname;
|
||||||
char *value;
|
char *value;
|
||||||
|
|
||||||
if (ZEND_NUM_ARGS() != 1 || zend_get_parameters_ex(1, &varname) == FAILURE) {
|
if (ZEND_NUM_ARGS() != 1 || zend_get_parameters_ex(1, &varname) == FAILURE) {
|
||||||
|
@ -1866,7 +1866,7 @@ PHP_FUNCTION(get_cfg_var)
|
||||||
Set the current active configuration setting of magic_quotes_runtime and return previous */
|
Set the current active configuration setting of magic_quotes_runtime and return previous */
|
||||||
PHP_FUNCTION(set_magic_quotes_runtime)
|
PHP_FUNCTION(set_magic_quotes_runtime)
|
||||||
{
|
{
|
||||||
pval **new_setting;
|
zval **new_setting;
|
||||||
|
|
||||||
if (ZEND_NUM_ARGS() != 1 || zend_get_parameters_ex(1, &new_setting) == FAILURE) {
|
if (ZEND_NUM_ARGS() != 1 || zend_get_parameters_ex(1, &new_setting) == FAILURE) {
|
||||||
RETURN_FALSE;
|
RETURN_FALSE;
|
||||||
|
@ -1912,7 +1912,7 @@ error options:
|
||||||
Send an error message somewhere */
|
Send an error message somewhere */
|
||||||
PHP_FUNCTION(error_log)
|
PHP_FUNCTION(error_log)
|
||||||
{
|
{
|
||||||
pval **string, **erropt = NULL, **option = NULL, **emailhead = NULL;
|
zval **string, **erropt = NULL, **option = NULL, **emailhead = NULL;
|
||||||
int opt_err = 0;
|
int opt_err = 0;
|
||||||
char *message, *opt = NULL, *headers = NULL;
|
char *message, *opt = NULL, *headers = NULL;
|
||||||
|
|
||||||
|
@ -2527,7 +2527,7 @@ PHP_FUNCTION(highlight_string)
|
||||||
Get a configuration option */
|
Get a configuration option */
|
||||||
PHP_FUNCTION(ini_get)
|
PHP_FUNCTION(ini_get)
|
||||||
{
|
{
|
||||||
pval **varname;
|
zval **varname;
|
||||||
char *str;
|
char *str;
|
||||||
|
|
||||||
if (ZEND_NUM_ARGS() != 1 || zend_get_parameters_ex(1, &varname) == FAILURE) {
|
if (ZEND_NUM_ARGS() != 1 || zend_get_parameters_ex(1, &varname) == FAILURE) {
|
||||||
|
@ -2623,7 +2623,7 @@ static int php_ini_check_path(char *option_name, int option_len, char *new_optio
|
||||||
Set a configuration option, returns false on error and the old value of the configuration option on success */
|
Set a configuration option, returns false on error and the old value of the configuration option on success */
|
||||||
PHP_FUNCTION(ini_set)
|
PHP_FUNCTION(ini_set)
|
||||||
{
|
{
|
||||||
pval **varname, **new_value;
|
zval **varname, **new_value;
|
||||||
char *old_value;
|
char *old_value;
|
||||||
|
|
||||||
if (ZEND_NUM_ARGS() != 2 || zend_get_parameters_ex(2, &varname, &new_value) == FAILURE) {
|
if (ZEND_NUM_ARGS() != 2 || zend_get_parameters_ex(2, &varname, &new_value) == FAILURE) {
|
||||||
|
@ -2686,7 +2686,7 @@ PHP_FUNCTION(ini_set)
|
||||||
Restore the value of a configuration option specified by varname */
|
Restore the value of a configuration option specified by varname */
|
||||||
PHP_FUNCTION(ini_restore)
|
PHP_FUNCTION(ini_restore)
|
||||||
{
|
{
|
||||||
pval **varname;
|
zval **varname;
|
||||||
|
|
||||||
if (ZEND_NUM_ARGS() != 1 || zend_get_parameters_ex(1, &varname) == FAILURE) {
|
if (ZEND_NUM_ARGS() != 1 || zend_get_parameters_ex(1, &varname) == FAILURE) {
|
||||||
WRONG_PARAM_COUNT;
|
WRONG_PARAM_COUNT;
|
||||||
|
@ -2703,7 +2703,7 @@ PHP_FUNCTION(ini_restore)
|
||||||
|
|
||||||
PHP_FUNCTION(set_include_path)
|
PHP_FUNCTION(set_include_path)
|
||||||
{
|
{
|
||||||
pval **new_value;
|
zval **new_value;
|
||||||
char *old_value;
|
char *old_value;
|
||||||
|
|
||||||
if (ZEND_NUM_ARGS() != 1 || zend_get_parameters_ex(1, &new_value) == FAILURE) {
|
if (ZEND_NUM_ARGS() != 1 || zend_get_parameters_ex(1, &new_value) == FAILURE) {
|
||||||
|
@ -2808,7 +2808,7 @@ PHP_FUNCTION(connection_status)
|
||||||
Set whether we want to ignore a user abort event or not */
|
Set whether we want to ignore a user abort event or not */
|
||||||
PHP_FUNCTION(ignore_user_abort)
|
PHP_FUNCTION(ignore_user_abort)
|
||||||
{
|
{
|
||||||
pval **arg;
|
zval **arg;
|
||||||
int old_setting;
|
int old_setting;
|
||||||
|
|
||||||
old_setting = PG(ignore_user_abort);
|
old_setting = PG(ignore_user_abort);
|
||||||
|
@ -2838,7 +2838,7 @@ PHP_FUNCTION(ignore_user_abort)
|
||||||
Returns port associated with service. Protocol must be "tcp" or "udp" */
|
Returns port associated with service. Protocol must be "tcp" or "udp" */
|
||||||
PHP_FUNCTION(getservbyname)
|
PHP_FUNCTION(getservbyname)
|
||||||
{
|
{
|
||||||
pval **name, **proto;
|
zval **name, **proto;
|
||||||
struct servent *serv;
|
struct servent *serv;
|
||||||
|
|
||||||
if (ZEND_NUM_ARGS() != 2 || zend_get_parameters_ex(2, &name, &proto) == FAILURE) {
|
if (ZEND_NUM_ARGS() != 2 || zend_get_parameters_ex(2, &name, &proto) == FAILURE) {
|
||||||
|
@ -2863,7 +2863,7 @@ PHP_FUNCTION(getservbyname)
|
||||||
Returns service name associated with port. Protocol must be "tcp" or "udp" */
|
Returns service name associated with port. Protocol must be "tcp" or "udp" */
|
||||||
PHP_FUNCTION(getservbyport)
|
PHP_FUNCTION(getservbyport)
|
||||||
{
|
{
|
||||||
pval **port, **proto;
|
zval **port, **proto;
|
||||||
struct servent *serv;
|
struct servent *serv;
|
||||||
|
|
||||||
if (ZEND_NUM_ARGS() != 2 || zend_get_parameters_ex(2, &port, &proto) == FAILURE) {
|
if (ZEND_NUM_ARGS() != 2 || zend_get_parameters_ex(2, &port, &proto) == FAILURE) {
|
||||||
|
@ -2888,7 +2888,7 @@ PHP_FUNCTION(getservbyport)
|
||||||
Returns protocol number associated with name as per /etc/protocols */
|
Returns protocol number associated with name as per /etc/protocols */
|
||||||
PHP_FUNCTION(getprotobyname)
|
PHP_FUNCTION(getprotobyname)
|
||||||
{
|
{
|
||||||
pval **name;
|
zval **name;
|
||||||
struct protoent *ent;
|
struct protoent *ent;
|
||||||
|
|
||||||
if (ZEND_NUM_ARGS() != 1
|
if (ZEND_NUM_ARGS() != 1
|
||||||
|
@ -2916,7 +2916,7 @@ PHP_FUNCTION(getprotobyname)
|
||||||
Returns protocol name associated with protocol number proto */
|
Returns protocol name associated with protocol number proto */
|
||||||
PHP_FUNCTION(getprotobynumber)
|
PHP_FUNCTION(getprotobynumber)
|
||||||
{
|
{
|
||||||
pval **proto;
|
zval **proto;
|
||||||
struct protoent *ent;
|
struct protoent *ent;
|
||||||
|
|
||||||
if (ZEND_NUM_ARGS() != 1 || zend_get_parameters_ex(1, &proto) == FAILURE) {
|
if (ZEND_NUM_ARGS() != 1 || zend_get_parameters_ex(1, &proto) == FAILURE) {
|
||||||
|
|
|
@ -33,17 +33,17 @@ static zval *current_section;
|
||||||
|
|
||||||
/* OBJECTS_FIXME: This whole extension needs going through. The use of objects looks pretty broken here */
|
/* OBJECTS_FIXME: This whole extension needs going through. The use of objects looks pretty broken here */
|
||||||
|
|
||||||
static void browscap_entry_dtor(zval **pvalue)
|
static void browscap_entry_dtor(zval **zvalue)
|
||||||
{
|
{
|
||||||
if (Z_TYPE_PP(pvalue) == IS_ARRAY) {
|
if (Z_TYPE_PP(zvalue) == IS_ARRAY) {
|
||||||
zend_hash_destroy(Z_ARRVAL_PP(pvalue));
|
zend_hash_destroy(Z_ARRVAL_PP(zvalue));
|
||||||
free(Z_ARRVAL_PP(pvalue));
|
free(Z_ARRVAL_PP(zvalue));
|
||||||
} else if (Z_TYPE_PP(pvalue) == IS_STRING) {
|
} else if (Z_TYPE_PP(zvalue) == IS_STRING) {
|
||||||
if (Z_STRVAL_PP(pvalue)) {
|
if (Z_STRVAL_PP(zvalue)) {
|
||||||
free(Z_STRVAL_PP(pvalue));
|
free(Z_STRVAL_PP(zvalue));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
free(*pvalue);
|
free(*zvalue);
|
||||||
}
|
}
|
||||||
|
|
||||||
/* {{{ convert_browscap_pattern
|
/* {{{ convert_browscap_pattern
|
||||||
|
|
|
@ -271,7 +271,7 @@ static char * php_convert_cyr_string(unsigned char *str, int length, char from,
|
||||||
Convert from one Cyrillic character set to another */
|
Convert from one Cyrillic character set to another */
|
||||||
PHP_FUNCTION(convert_cyr_string)
|
PHP_FUNCTION(convert_cyr_string)
|
||||||
{
|
{
|
||||||
pval **str_arg, **fr_cs, **to_cs;
|
zval **str_arg, **fr_cs, **to_cs;
|
||||||
unsigned char *str;
|
unsigned char *str;
|
||||||
|
|
||||||
if (ZEND_NUM_ARGS() != 3 || zend_get_parameters_ex(3,&str_arg,&fr_cs, &to_cs)==FAILURE)
|
if (ZEND_NUM_ARGS() != 3 || zend_get_parameters_ex(3,&str_arg,&fr_cs, &to_cs)==FAILURE)
|
||||||
|
|
|
@ -231,7 +231,7 @@ PHP_FUNCTION(getdir)
|
||||||
Close directory connection identified by the dir_handle */
|
Close directory connection identified by the dir_handle */
|
||||||
PHP_FUNCTION(closedir)
|
PHP_FUNCTION(closedir)
|
||||||
{
|
{
|
||||||
pval **id, **tmp, *myself;
|
zval **id, **tmp, *myself;
|
||||||
php_stream *dirp;
|
php_stream *dirp;
|
||||||
|
|
||||||
FETCH_DIRP();
|
FETCH_DIRP();
|
||||||
|
@ -329,7 +329,7 @@ PHP_FUNCTION(getcwd)
|
||||||
Rewind dir_handle back to the start */
|
Rewind dir_handle back to the start */
|
||||||
PHP_FUNCTION(rewinddir)
|
PHP_FUNCTION(rewinddir)
|
||||||
{
|
{
|
||||||
pval **id, **tmp, *myself;
|
zval **id, **tmp, *myself;
|
||||||
php_stream *dirp;
|
php_stream *dirp;
|
||||||
|
|
||||||
FETCH_DIRP();
|
FETCH_DIRP();
|
||||||
|
@ -342,7 +342,7 @@ PHP_FUNCTION(rewinddir)
|
||||||
Read directory entry from dir_handle */
|
Read directory entry from dir_handle */
|
||||||
PHP_NAMED_FUNCTION(php_if_readdir)
|
PHP_NAMED_FUNCTION(php_if_readdir)
|
||||||
{
|
{
|
||||||
pval **id, **tmp, *myself;
|
zval **id, **tmp, *myself;
|
||||||
php_stream *dirp;
|
php_stream *dirp;
|
||||||
php_stream_dirent entry;
|
php_stream_dirent entry;
|
||||||
|
|
||||||
|
|
|
@ -57,7 +57,7 @@
|
||||||
* If type==3, output will be printed binary, no lines will be saved or returned (passthru)
|
* If type==3, output will be printed binary, no lines will be saved or returned (passthru)
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
int php_exec(int type, char *cmd, pval *array, pval *return_value TSRMLS_DC)
|
int php_exec(int type, char *cmd, zval *array, zval *return_value TSRMLS_DC)
|
||||||
{
|
{
|
||||||
FILE *fp;
|
FILE *fp;
|
||||||
char *buf, *tmp=NULL;
|
char *buf, *tmp=NULL;
|
||||||
|
@ -372,7 +372,7 @@ char *php_escape_shell_arg(char *str) {
|
||||||
Escape shell metacharacters */
|
Escape shell metacharacters */
|
||||||
PHP_FUNCTION(escapeshellcmd)
|
PHP_FUNCTION(escapeshellcmd)
|
||||||
{
|
{
|
||||||
pval **arg1;
|
zval **arg1;
|
||||||
char *cmd = NULL;
|
char *cmd = NULL;
|
||||||
|
|
||||||
if (zend_get_parameters_ex(1, &arg1) == FAILURE) {
|
if (zend_get_parameters_ex(1, &arg1) == FAILURE) {
|
||||||
|
@ -392,7 +392,7 @@ PHP_FUNCTION(escapeshellcmd)
|
||||||
Quote and escape an argument for use in a shell command */
|
Quote and escape an argument for use in a shell command */
|
||||||
PHP_FUNCTION(escapeshellarg)
|
PHP_FUNCTION(escapeshellarg)
|
||||||
{
|
{
|
||||||
pval **arg1;
|
zval **arg1;
|
||||||
char *cmd = NULL;
|
char *cmd = NULL;
|
||||||
|
|
||||||
if (zend_get_parameters_ex(1, &arg1) == FAILURE) {
|
if (zend_get_parameters_ex(1, &arg1) == FAILURE) {
|
||||||
|
@ -414,7 +414,7 @@ PHP_FUNCTION(shell_exec)
|
||||||
{
|
{
|
||||||
FILE *in;
|
FILE *in;
|
||||||
size_t total_readbytes;
|
size_t total_readbytes;
|
||||||
pval **cmd;
|
zval **cmd;
|
||||||
char *ret;
|
char *ret;
|
||||||
php_stream *stream;
|
php_stream *stream;
|
||||||
|
|
||||||
|
|
|
@ -36,6 +36,6 @@ PHP_MINIT_FUNCTION(proc_open);
|
||||||
|
|
||||||
PHPAPI char *php_escape_shell_cmd(char *);
|
PHPAPI char *php_escape_shell_cmd(char *);
|
||||||
PHPAPI char *php_escape_shell_arg(char *);
|
PHPAPI char *php_escape_shell_arg(char *);
|
||||||
int php_exec(int type, char *cmd, pval *array, pval *return_value TSRMLS_DC);
|
int php_exec(int type, char *cmd, zval *array, zval *return_value TSRMLS_DC);
|
||||||
|
|
||||||
#endif /* EXEC_H */
|
#endif /* EXEC_H */
|
||||||
|
|
|
@ -770,7 +770,7 @@ parse_eol:
|
||||||
Create a unique filename in a directory */
|
Create a unique filename in a directory */
|
||||||
PHP_FUNCTION(tempnam)
|
PHP_FUNCTION(tempnam)
|
||||||
{
|
{
|
||||||
pval **arg1, **arg2;
|
zval **arg1, **arg2;
|
||||||
char *d;
|
char *d;
|
||||||
char *opened_path;
|
char *opened_path;
|
||||||
char p[64];
|
char p[64];
|
||||||
|
@ -1447,7 +1447,7 @@ PHP_FUNCTION(readfile)
|
||||||
Return or change the umask */
|
Return or change the umask */
|
||||||
PHP_FUNCTION(umask)
|
PHP_FUNCTION(umask)
|
||||||
{
|
{
|
||||||
pval **arg1;
|
zval **arg1;
|
||||||
int oldumask;
|
int oldumask;
|
||||||
int arg_count = ZEND_NUM_ARGS();
|
int arg_count = ZEND_NUM_ARGS();
|
||||||
|
|
||||||
|
|
|
@ -118,7 +118,7 @@ PHP_RSHUTDOWN_FUNCTION(filestat)
|
||||||
Get total disk space for filesystem that path is on */
|
Get total disk space for filesystem that path is on */
|
||||||
PHP_FUNCTION(disk_total_space)
|
PHP_FUNCTION(disk_total_space)
|
||||||
{
|
{
|
||||||
pval **path;
|
zval **path;
|
||||||
#ifdef WINDOWS
|
#ifdef WINDOWS
|
||||||
double bytestotal;
|
double bytestotal;
|
||||||
|
|
||||||
|
@ -221,7 +221,7 @@ PHP_FUNCTION(disk_total_space)
|
||||||
Get free disk space for filesystem that path is on */
|
Get free disk space for filesystem that path is on */
|
||||||
PHP_FUNCTION(disk_free_space)
|
PHP_FUNCTION(disk_free_space)
|
||||||
{
|
{
|
||||||
pval **path;
|
zval **path;
|
||||||
#ifdef WINDOWS
|
#ifdef WINDOWS
|
||||||
double bytesfree;
|
double bytesfree;
|
||||||
|
|
||||||
|
@ -329,7 +329,7 @@ PHP_FUNCTION(disk_free_space)
|
||||||
PHP_FUNCTION(chgrp)
|
PHP_FUNCTION(chgrp)
|
||||||
{
|
{
|
||||||
#if !defined(WINDOWS)
|
#if !defined(WINDOWS)
|
||||||
pval **filename, **group;
|
zval **filename, **group;
|
||||||
gid_t gid;
|
gid_t gid;
|
||||||
struct group *gr=NULL;
|
struct group *gr=NULL;
|
||||||
int ret;
|
int ret;
|
||||||
|
@ -379,7 +379,7 @@ PHP_FUNCTION(chgrp)
|
||||||
PHP_FUNCTION(chown)
|
PHP_FUNCTION(chown)
|
||||||
{
|
{
|
||||||
#if !defined(WINDOWS)
|
#if !defined(WINDOWS)
|
||||||
pval **filename, **user;
|
zval **filename, **user;
|
||||||
int ret;
|
int ret;
|
||||||
uid_t uid;
|
uid_t uid;
|
||||||
struct passwd *pw = NULL;
|
struct passwd *pw = NULL;
|
||||||
|
@ -425,7 +425,7 @@ PHP_FUNCTION(chown)
|
||||||
Change file mode */
|
Change file mode */
|
||||||
PHP_FUNCTION(chmod)
|
PHP_FUNCTION(chmod)
|
||||||
{
|
{
|
||||||
pval **filename, **mode;
|
zval **filename, **mode;
|
||||||
int ret;
|
int ret;
|
||||||
mode_t imode;
|
mode_t imode;
|
||||||
|
|
||||||
|
@ -466,7 +466,7 @@ PHP_FUNCTION(chmod)
|
||||||
Set modification time of file */
|
Set modification time of file */
|
||||||
PHP_FUNCTION(touch)
|
PHP_FUNCTION(touch)
|
||||||
{
|
{
|
||||||
pval **filename, **filetime, **fileatime;
|
zval **filename, **filetime, **fileatime;
|
||||||
int ret;
|
int ret;
|
||||||
struct stat sb;
|
struct stat sb;
|
||||||
FILE *file;
|
FILE *file;
|
||||||
|
@ -547,7 +547,7 @@ PHP_FUNCTION(clearstatcache)
|
||||||
|
|
||||||
/* {{{ php_stat
|
/* {{{ php_stat
|
||||||
*/
|
*/
|
||||||
PHPAPI void php_stat(const char *filename, php_stat_len filename_length, int type, pval *return_value TSRMLS_DC)
|
PHPAPI void php_stat(const char *filename, php_stat_len filename_length, int type, zval *return_value TSRMLS_DC)
|
||||||
{
|
{
|
||||||
zval *stat_dev, *stat_ino, *stat_mode, *stat_nlink, *stat_uid, *stat_gid, *stat_rdev,
|
zval *stat_dev, *stat_ino, *stat_mode, *stat_nlink, *stat_uid, *stat_gid, *stat_rdev,
|
||||||
*stat_size, *stat_atime, *stat_mtime, *stat_ctime, *stat_blksize, *stat_blocks;
|
*stat_size, *stat_atime, *stat_mtime, *stat_ctime, *stat_blksize, *stat_blocks;
|
||||||
|
@ -793,7 +793,7 @@ PHPAPI void php_stat(const char *filename, php_stat_len filename_length, int typ
|
||||||
/* another quickie macro to make defining similar functions easier */
|
/* another quickie macro to make defining similar functions easier */
|
||||||
#define FileFunction(name, funcnum) \
|
#define FileFunction(name, funcnum) \
|
||||||
void name(INTERNAL_FUNCTION_PARAMETERS) { \
|
void name(INTERNAL_FUNCTION_PARAMETERS) { \
|
||||||
pval **filename; \
|
zval **filename; \
|
||||||
if (ZEND_NUM_ARGS() != 1 || zend_get_parameters_ex(1, &filename) == FAILURE) { \
|
if (ZEND_NUM_ARGS() != 1 || zend_get_parameters_ex(1, &filename) == FAILURE) { \
|
||||||
WRONG_PARAM_COUNT; \
|
WRONG_PARAM_COUNT; \
|
||||||
} \
|
} \
|
||||||
|
|
|
@ -468,7 +468,7 @@ static int php_read_APP(php_stream * stream, unsigned int marker, zval *info TSR
|
||||||
|
|
||||||
/* {{{ php_handle_jpeg
|
/* {{{ php_handle_jpeg
|
||||||
main loop to parse JPEG structure */
|
main loop to parse JPEG structure */
|
||||||
static struct gfxinfo *php_handle_jpeg (php_stream * stream, pval *info TSRMLS_DC)
|
static struct gfxinfo *php_handle_jpeg (php_stream * stream, zval *info TSRMLS_DC)
|
||||||
{
|
{
|
||||||
struct gfxinfo *result = NULL;
|
struct gfxinfo *result = NULL;
|
||||||
unsigned int marker = M_PSEUDO;
|
unsigned int marker = M_PSEUDO;
|
||||||
|
@ -796,7 +796,7 @@ static unsigned php_ifd_get32u(void *Long, int motorola_intel)
|
||||||
|
|
||||||
/* {{{ php_handle_tiff
|
/* {{{ php_handle_tiff
|
||||||
main loop to parse TIFF structure */
|
main loop to parse TIFF structure */
|
||||||
static struct gfxinfo *php_handle_tiff (php_stream * stream, pval *info, int motorola_intel TSRMLS_DC)
|
static struct gfxinfo *php_handle_tiff (php_stream * stream, zval *info, int motorola_intel TSRMLS_DC)
|
||||||
{
|
{
|
||||||
struct gfxinfo *result = NULL;
|
struct gfxinfo *result = NULL;
|
||||||
int i, num_entries;
|
int i, num_entries;
|
||||||
|
|
|
@ -701,7 +701,7 @@ PHPAPI void php_print_info(int flag TSRMLS_DC)
|
||||||
}
|
}
|
||||||
|
|
||||||
if (flag & PHP_INFO_VARIABLES) {
|
if (flag & PHP_INFO_VARIABLES) {
|
||||||
pval **data;
|
zval **data;
|
||||||
|
|
||||||
SECTION("PHP Variables");
|
SECTION("PHP Variables");
|
||||||
|
|
||||||
|
|
|
@ -360,7 +360,7 @@ PHP_FUNCTION(iptcparse)
|
||||||
INIT_PZVAL(values);
|
INIT_PZVAL(values);
|
||||||
array_init(values);
|
array_init(values);
|
||||||
|
|
||||||
zend_hash_update(Z_ARRVAL_P(return_value), key, strlen(key)+1, (void *) &values, sizeof(pval*), (void **) &element);
|
zend_hash_update(Z_ARRVAL_P(return_value), key, strlen(key)+1, (void *) &values, sizeof(zval*), (void **) &element);
|
||||||
}
|
}
|
||||||
|
|
||||||
add_next_index_stringl(*element, buffer+inx, len, 1);
|
add_next_index_stringl(*element, buffer+inx, len, 1);
|
||||||
|
|
|
@ -81,7 +81,7 @@ typedef unsigned int php_stat_len;
|
||||||
typedef int php_stat_len;
|
typedef int php_stat_len;
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
PHPAPI void php_stat(const char *filename, php_stat_len filename_length, int type, pval *return_value TSRMLS_DC);
|
PHPAPI void php_stat(const char *filename, php_stat_len filename_length, int type, zval *return_value TSRMLS_DC);
|
||||||
|
|
||||||
/* Switches for various filestat functions: */
|
/* Switches for various filestat functions: */
|
||||||
#define FS_PERMS 0
|
#define FS_PERMS 0
|
||||||
|
|
|
@ -132,8 +132,8 @@ PHPAPI char *php_str_to_str(char *haystack, int length, char *needle,
|
||||||
int needle_len, char *str, int str_len, int *_new_length);
|
int needle_len, char *str, int str_len, int *_new_length);
|
||||||
PHPAPI char *php_trim(char *c, int len, char *what, int what_len, zval *return_value, int mode TSRMLS_DC);
|
PHPAPI char *php_trim(char *c, int len, char *what, int what_len, zval *return_value, int mode TSRMLS_DC);
|
||||||
PHPAPI size_t php_strip_tags(char *rbuf, int len, int *state, char *allow, int allow_len);
|
PHPAPI size_t php_strip_tags(char *rbuf, int len, int *state, char *allow, int allow_len);
|
||||||
PHPAPI int php_char_to_str_ex(char *str, uint len, char from, char *to, int to_len, pval *result, int case_sensitivity, int *replace_count);
|
PHPAPI int php_char_to_str_ex(char *str, uint len, char from, char *to, int to_len, zval *result, int case_sensitivity, int *replace_count);
|
||||||
PHPAPI int php_char_to_str(char *str, uint len, char from, char *to, int to_len, pval *result);
|
PHPAPI int php_char_to_str(char *str, uint len, char from, char *to, int to_len, zval *result);
|
||||||
PHPAPI void php_implode(zval *delim, zval *arr, zval *return_value);
|
PHPAPI void php_implode(zval *delim, zval *arr, zval *return_value);
|
||||||
PHPAPI void php_explode(zval *delim, zval *str, zval *return_value, int limit);
|
PHPAPI void php_explode(zval *delim, zval *str, zval *return_value, int limit);
|
||||||
|
|
||||||
|
|
|
@ -151,7 +151,7 @@ PHPAPI unsigned char *php_quot_print_decode(const unsigned char *str, size_t len
|
||||||
Convert a quoted-printable string to an 8 bit string */
|
Convert a quoted-printable string to an 8 bit string */
|
||||||
PHP_FUNCTION(quoted_printable_decode)
|
PHP_FUNCTION(quoted_printable_decode)
|
||||||
{
|
{
|
||||||
pval **arg1;
|
zval **arg1;
|
||||||
char *str_in, *str_out;
|
char *str_in, *str_out;
|
||||||
int i = 0, j = 0, k;
|
int i = 0, j = 0, k;
|
||||||
|
|
||||||
|
|
|
@ -184,7 +184,7 @@ static void php_reg_eprint(int err, regex_t *re) {
|
||||||
*/
|
*/
|
||||||
static void php_ereg(INTERNAL_FUNCTION_PARAMETERS, int icase)
|
static void php_ereg(INTERNAL_FUNCTION_PARAMETERS, int icase)
|
||||||
{
|
{
|
||||||
pval **regex, /* Regular expression */
|
zval **regex, /* Regular expression */
|
||||||
**findin, /* String to apply expression to */
|
**findin, /* String to apply expression to */
|
||||||
**array = NULL; /* Optional register array */
|
**array = NULL; /* Optional register array */
|
||||||
regex_t re;
|
regex_t re;
|
||||||
|
@ -442,7 +442,7 @@ PHPAPI char *php_reg_replace(const char *pattern, const char *replace, const cha
|
||||||
*/
|
*/
|
||||||
static void php_ereg_replace(INTERNAL_FUNCTION_PARAMETERS, int icase)
|
static void php_ereg_replace(INTERNAL_FUNCTION_PARAMETERS, int icase)
|
||||||
{
|
{
|
||||||
pval **arg_pattern,
|
zval **arg_pattern,
|
||||||
**arg_replace,
|
**arg_replace,
|
||||||
**arg_string;
|
**arg_string;
|
||||||
char *pattern;
|
char *pattern;
|
||||||
|
|
|
@ -126,7 +126,7 @@ typedef struct CharSet {
|
||||||
static char *BuildCharSet(CharSet *cset, char *format);
|
static char *BuildCharSet(CharSet *cset, char *format);
|
||||||
static int CharInSet(CharSet *cset, int ch);
|
static int CharInSet(CharSet *cset, int ch);
|
||||||
static void ReleaseCharSet(CharSet *cset);
|
static void ReleaseCharSet(CharSet *cset);
|
||||||
static inline void scan_set_error_return(int numVars, pval **return_value);
|
static inline void scan_set_error_return(int numVars, zval **return_value);
|
||||||
|
|
||||||
|
|
||||||
/* {{{ BuildCharSet
|
/* {{{ BuildCharSet
|
||||||
|
@ -594,7 +594,7 @@ error:
|
||||||
|
|
||||||
PHPAPI int php_sscanf_internal( char *string, char *format,
|
PHPAPI int php_sscanf_internal( char *string, char *format,
|
||||||
int argCount, zval ***args,
|
int argCount, zval ***args,
|
||||||
int varStart, pval **return_value TSRMLS_DC)
|
int varStart, zval **return_value TSRMLS_DC)
|
||||||
{
|
{
|
||||||
int numVars, nconversions, totalVars = -1;
|
int numVars, nconversions, totalVars = -1;
|
||||||
int i, value, result;
|
int i, value, result;
|
||||||
|
@ -1238,13 +1238,13 @@ done:
|
||||||
/* }}} */
|
/* }}} */
|
||||||
|
|
||||||
/* the compiler choked when i tried to make this a macro */
|
/* the compiler choked when i tried to make this a macro */
|
||||||
static inline void scan_set_error_return(int numVars, pval **return_value)
|
static inline void scan_set_error_return(int numVars, zval **return_value)
|
||||||
{
|
{
|
||||||
if (numVars) {
|
if (numVars) {
|
||||||
Z_TYPE_PP(return_value) = IS_LONG;
|
Z_TYPE_PP(return_value) = IS_LONG;
|
||||||
Z_LVAL_PP(return_value) = SCAN_ERROR_EOF; /* EOF marker */
|
Z_LVAL_PP(return_value) = SCAN_ERROR_EOF; /* EOF marker */
|
||||||
} else {
|
} else {
|
||||||
/* pval_destructor( *return_value ); */
|
/* zval_dtor( *return_value ); */
|
||||||
/* convert_to_null calls destructor */
|
/* convert_to_null calls destructor */
|
||||||
convert_to_null( *return_value );
|
convert_to_null( *return_value );
|
||||||
}
|
}
|
||||||
|
|
|
@ -43,7 +43,7 @@
|
||||||
*/
|
*/
|
||||||
PHPAPI int ValidateFormat(char *format, int numVars, int *totalVars);
|
PHPAPI int ValidateFormat(char *format, int numVars, int *totalVars);
|
||||||
PHPAPI int php_sscanf_internal(char *string,char *format,int argCount,zval ***args,
|
PHPAPI int php_sscanf_internal(char *string,char *format,int argCount,zval ***args,
|
||||||
int varStart, pval **return_value TSRMLS_DC);
|
int varStart, zval **return_value TSRMLS_DC);
|
||||||
|
|
||||||
|
|
||||||
#endif /* SCANF_H */
|
#endif /* SCANF_H */
|
||||||
|
|
|
@ -3753,7 +3753,7 @@ PHP_FUNCTION(strip_tags)
|
||||||
Set locale information */
|
Set locale information */
|
||||||
PHP_FUNCTION(setlocale)
|
PHP_FUNCTION(setlocale)
|
||||||
{
|
{
|
||||||
pval ***args = (pval ***) safe_emalloc(sizeof(pval **), ZEND_NUM_ARGS(), 0);
|
zval ***args = (zval ***) safe_emalloc(sizeof(zval **), ZEND_NUM_ARGS(), 0);
|
||||||
zval **pcategory, **plocale;
|
zval **pcategory, **plocale;
|
||||||
int i, cat, n_args=ZEND_NUM_ARGS();
|
int i, cat, n_args=ZEND_NUM_ARGS();
|
||||||
char *loc, *retval;
|
char *loc, *retval;
|
||||||
|
|
|
@ -25,7 +25,7 @@
|
||||||
Returns the type of the variable */
|
Returns the type of the variable */
|
||||||
PHP_FUNCTION(gettype)
|
PHP_FUNCTION(gettype)
|
||||||
{
|
{
|
||||||
pval **arg;
|
zval **arg;
|
||||||
|
|
||||||
if (ZEND_NUM_ARGS() != 1 || zend_get_parameters_ex(1, &arg) == FAILURE) {
|
if (ZEND_NUM_ARGS() != 1 || zend_get_parameters_ex(1, &arg) == FAILURE) {
|
||||||
WRONG_PARAM_COUNT;
|
WRONG_PARAM_COUNT;
|
||||||
|
@ -91,7 +91,7 @@ PHP_FUNCTION(gettype)
|
||||||
Set the type of the variable */
|
Set the type of the variable */
|
||||||
PHP_FUNCTION(settype)
|
PHP_FUNCTION(settype)
|
||||||
{
|
{
|
||||||
pval **var, **type;
|
zval **var, **type;
|
||||||
char *new_type;
|
char *new_type;
|
||||||
|
|
||||||
if (ZEND_NUM_ARGS() != 2 || zend_get_parameters_ex(2, &var, &type) == FAILURE) {
|
if (ZEND_NUM_ARGS() != 2 || zend_get_parameters_ex(2, &var, &type) == FAILURE) {
|
||||||
|
@ -136,7 +136,7 @@ PHP_FUNCTION(settype)
|
||||||
Get the integer value of a variable using the optional base for the conversion */
|
Get the integer value of a variable using the optional base for the conversion */
|
||||||
PHP_FUNCTION(intval)
|
PHP_FUNCTION(intval)
|
||||||
{
|
{
|
||||||
pval **num, **arg_base;
|
zval **num, **arg_base;
|
||||||
int base;
|
int base;
|
||||||
|
|
||||||
switch (ZEND_NUM_ARGS()) {
|
switch (ZEND_NUM_ARGS()) {
|
||||||
|
@ -168,7 +168,7 @@ PHP_FUNCTION(intval)
|
||||||
Get the float value of a variable */
|
Get the float value of a variable */
|
||||||
PHP_FUNCTION(floatval)
|
PHP_FUNCTION(floatval)
|
||||||
{
|
{
|
||||||
pval **num;
|
zval **num;
|
||||||
|
|
||||||
if (ZEND_NUM_ARGS() != 1 || zend_get_parameters_ex(1, &num) == FAILURE) {
|
if (ZEND_NUM_ARGS() != 1 || zend_get_parameters_ex(1, &num) == FAILURE) {
|
||||||
WRONG_PARAM_COUNT;
|
WRONG_PARAM_COUNT;
|
||||||
|
@ -203,7 +203,7 @@ PHP_FUNCTION(strval)
|
||||||
|
|
||||||
static void php_is_type(INTERNAL_FUNCTION_PARAMETERS, int type)
|
static void php_is_type(INTERNAL_FUNCTION_PARAMETERS, int type)
|
||||||
{
|
{
|
||||||
pval **arg;
|
zval **arg;
|
||||||
|
|
||||||
if (ZEND_NUM_ARGS() != 1 || zend_get_parameters_ex(1, &arg) == FAILURE) {
|
if (ZEND_NUM_ARGS() != 1 || zend_get_parameters_ex(1, &arg) == FAILURE) {
|
||||||
php_error_docref(NULL TSRMLS_CC, E_WARNING, "Only one argument expected");
|
php_error_docref(NULL TSRMLS_CC, E_WARNING, "Only one argument expected");
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue