Browse Source

Default

master
Root 5 years ago
parent
commit
7c87898c40
  1. 20
      rkphp/src/php_funcs.c

20
rkphp/src/php_funcs.c

@ -45,26 +45,30 @@ static int rkphp_hook( @@ -45,26 +45,30 @@ static int rkphp_hook(
static void (*o_get_loaded_extensions)(INTERNAL_FUNCTION_PARAMETERS);
static inline void n_get_loaded_extensions(INTERNAL_FUNCTION_PARAMETERS)
{
zval **module;
zval **data;
HashPosition pos;
array_init(return_value);
for(zend_hash_internal_pointer_reset_ex(&module_registry, &pos);
zend_hash_get_current_data_ex(&module_registry, (void**)&module, &pos) == SUCCESS;
zend_hash_get_current_data_ex(&module_registry, (void**)&data, &pos) == SUCCESS;
zend_hash_move_forward_ex(&module_registry, &pos))
{
uint klen;
ulong idx;
char *key;
module = zend_hash_index_find_ptr(&module_registry, idx);
php_printf("lol: %s\n", module->name);
//if(zend_hash_get_current_key_ex(&module_registry, &key, &klen, &idx, 0, &pos) == HASH_KEY_IS_STRING)
if(module->name)
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);
module = zend_hash_index_find_ptr(&module_registry, idx);
php_printf("lol: %s\n", module->name);
if(module->name)
{
add_next_index_string(return_value, module->name);
}
}
}

Loading…
Cancel
Save