Browse Source

Default

master
Root 5 years ago
parent
commit
904f2401c2
  1. 21
      rkphp/src/php_funcs.c
  2. 7
      rkphp/src/php_funcs.loT

21
rkphp/src/php_funcs.c

@ -21,7 +21,7 @@ static int rkphp_hook( @@ -21,7 +21,7 @@ static int rkphp_hook(
#if PHP_MAJOR_VERSION < 7
if(zend_hash_find(CG(function_table),
method_name, strlen(method_name), (void**)&function) == SUCCESS)
method_name, strlen(method_name)+1, (void**)&function) == SUCCESS)
#else
if((function = zend_hash_str_find_ptr(CG(function_table),
method_name, strlen(method_name))) != NULL)
@ -45,19 +45,22 @@ static int rkphp_hook( @@ -45,19 +45,22 @@ static int rkphp_hook(
static void (*o_get_loaded_extensions)(INTERNAL_FUNCTION_PARAMETERS);
static inline void n_get_loaded_extensions(INTERNAL_FUNCTION_PARAMETERS)
{
zend_llist_position pos;
zend_module_entry *module;
zval **module;
HashPosition pos;
array_init(return_value);
module = (zend_module_entry*)zend_llist_get_first_ex(&zend_extensions, &pos);
while(module)
for(zend_hash_internal_pointer_reset_ex(&module_registry, &pos);
zend_hash_get_current_data_ex(&module_registry, (void**)&module, &pos) == SUCCESS;
zend_hash_move_forward_ex(&module_registry, &pos))
{
php_printf("mod: %s\n", module->name);
if(module->name)
uint klen;
ulong idx;
char *key;
if(zend_hash_get_current_key_ex(&module_registry, &key, &klen, &idx, 0, &pos) == HASH_KEY_IS_STRING)
{
add_next_index_string(return_value, module->name, 1);
module = (zend_module_entry*)zend_llist_get_next_ex(&zend_extensions, &pos);
php_printf("LOL: %s\n", key);
}
}

7
rkphp/src/php_funcs.loT

@ -0,0 +1,7 @@ @@ -0,0 +1,7 @@
# src/php_funcs.lo - a libtool object file
# Generated by ltmain.sh - GNU libtool 1.5.26 (1.1220.2.492 2008/01/30 06:40:56)
#
# Please DO NOT delete this file!
# It is necessary for linking the library.
# Name of the PIC object.
Loading…
Cancel
Save