Since this move happened, I have been getting segfaults with the following
script:

<?php
        print_r(get_defined_constants());
?>

> -----Original Message-----
> From: Andrei Zmievski [mailto:[EMAIL PROTECTED]]
> Sent: Monday, May 21, 2001 11:44 AM
> To: [EMAIL PROTECTED]
> Subject: [PHP-CVS] cvs: php4 /ext/standard basic_functions.c
> basic_functions.h
>
>
> andrei                Mon May 21 08:44:25 2001 EDT
>
>   Modified files:
>     /php4/ext/standard        basic_functions.c basic_functions.h
>   Log:
>   Moving some functions into Zend.
>
>
> Index: php4/ext/standard/basic_functions.c
> diff -u php4/ext/standard/basic_functions.c:1.344
> php4/ext/standard/basic_functions.c:1.345
> --- php4/ext/standard/basic_functions.c:1.344 Mon May 21 08:27:11 2001
> +++ php4/ext/standard/basic_functions.c       Mon May 21 08:44:25 2001
> @@ -17,7 +17,7 @@
>
> +-------------------------------------------------------------
> ---------+
>   */
>
> -/* $Id: basic_functions.c,v 1.344 2001/05/21 15:27:11 andi Exp $ */
> +/* $Id: basic_functions.c,v 1.345 2001/05/21 15:44:25 andrei Exp $ */
>
>  #include "php.h"
>  #include "php_main.h"
> @@ -379,11 +379,6 @@
>       PHP_FE(connection_status,                       NULL)
>       PHP_FE(ignore_user_abort,                       NULL)
>
> -     PHP_FE(get_loaded_extensions,           NULL)
> -     PHP_FE(extension_loaded,                        NULL)
> -     PHP_FE(get_extension_funcs,                     NULL)
> -     PHP_FE(get_defined_constants,                   NULL)
> -
>       PHP_FE(parse_ini_file,                          NULL)
>
>       PHP_FE(is_uploaded_file,                        NULL)
> @@ -2358,92 +2353,6 @@
>  #endif
>  /* }}} */
>
> -
> -static int php_add_extension_info(zend_module_entry *module,
> void *arg)
> -{
> -     zval *name_array = (zval *)arg;
> -     add_next_index_string(name_array, module->name, 1);
> -     return 0;
> -}
> -
> -static int php_add_constant_info(zend_constant *constant, void *arg)
> -{
> -     zval *name_array = (zval *)arg;
> -     add_assoc_zval(name_array, constant->name, &(constant->value));
> -     return 0;
> -}
> -
> -/* {{{ proto array get_loaded_extensions(void)
> -   Return an array containing names of loaded extensions */
> -PHP_FUNCTION(get_loaded_extensions)
> -{
> -     if (ZEND_NUM_ARGS() != 0) {
> -             WRONG_PARAM_COUNT;
> -     }
> -
> -     array_init(return_value);
> -     zend_hash_apply_with_argument(&module_registry, (int
> (*)(void *, void*)) php_add_extension_info, return_value);
> -}
> -/* }}} */
> -
> -/* {{{ proto array get_defined_constants(void)
> -   Return an array containing the names and values of all
> defined constants */
> -PHP_FUNCTION(get_defined_constants)
> -{
> -     if (ZEND_NUM_ARGS() != 0) {
> -             WRONG_PARAM_COUNT;
> -     }
> -
> -     array_init(return_value);
> -     zend_hash_apply_with_argument(EG(zend_constants), (int
> (*)(void *, void*)) php_add_constant_info, return_value);
> -}
> -
> -/* {{{ proto bool extension_loaded(string extension_name)
> -   Returns true if the named extension is loaded */
> -PHP_FUNCTION(extension_loaded)
> -{
> -     zval **extension_name;
> -
> -     if (ZEND_NUM_ARGS() != 1 || zend_get_parameters_ex(1,
> &extension_name)) {
> -             WRONG_PARAM_COUNT;
> -     }
> -
> -     convert_to_string_ex(extension_name);
> -     if (zend_hash_exists(&module_registry,
> Z_STRVAL_PP(extension_name), Z_STRLEN_PP(extension_name)+1)) {
> -             RETURN_TRUE;
> -     } else {
> -             RETURN_FALSE;
> -     }
> -}
> -/* }}} */
> -
> -
> -/* {{{ proto array get_extension_funcs(string extension_name)
> -   Returns an array with the names of functions belonging to
> the named extension */
> -PHP_FUNCTION(get_extension_funcs)
> -{
> -     zval **extension_name;
> -     zend_module_entry *module;
> -     zend_function_entry *func;
> -
> -     if (ZEND_NUM_ARGS() != 1 || zend_get_parameters_ex(1,
> &extension_name)) {
> -             WRONG_PARAM_COUNT;
> -     }
> -
> -     convert_to_string_ex(extension_name);
> -     if (zend_hash_find(&module_registry,
> Z_STRVAL_PP(extension_name),
> -
> Z_STRLEN_PP(extension_name)+1, (void**)&module) == FAILURE) {
> -             return;
> -     }
> -
> -     array_init(return_value);
> -     func = module->functions;
> -     while(func->fname) {
> -             add_next_index_string(return_value, func->fname, 1);
> -             func++;
> -     }
> -}
> -/* }}} */
>
>  /* {{{ proto void register_tick_function(string
> function_name [, mixed arg [, ... ]])
>     Registers a tick callback function */
> Index: php4/ext/standard/basic_functions.h
> diff -u php4/ext/standard/basic_functions.h:1.78
> php4/ext/standard/basic_functions.h:1.79
> --- php4/ext/standard/basic_functions.h:1.78  Mon May 21 06:36:42 2001
> +++ php4/ext/standard/basic_functions.h       Mon May 21 08:44:25 2001
> @@ -17,7 +17,7 @@
>
> +-------------------------------------------------------------
> ---------+
>  */
>
> -/* $Id: basic_functions.h,v 1.78 2001/05/21 13:36:42 elixer Exp $ */
> +/* $Id: basic_functions.h,v 1.79 2001/05/21 15:44:25 andrei Exp $ */
>
>  #ifndef BASIC_FUNCTIONS_H
>  #define BASIC_FUNCTIONS_H
> @@ -107,11 +107,6 @@
>  PHP_FUNCTION(getprotobynumber);
>
>  PHP_NAMED_FUNCTION(php_if_crc32);
> -
> -PHP_FUNCTION(get_loaded_extensions);
> -PHP_FUNCTION(extension_loaded);
> -PHP_FUNCTION(get_extension_funcs);
> -PHP_FUNCTION(get_defined_constants);
>
>  PHP_FUNCTION(register_tick_function);
>  PHP_FUNCTION(unregister_tick_function);
>
>
>
> --
> PHP CVS Mailing List (http://www.php.net/)
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> To contact the list administrators, e-mail:
> [EMAIL PROTECTED]
>
>


-- 
PHP Development Mailing List <http://www.php.net/>
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]

Reply via email to