Browse Source

Default

master
Root 5 years ago
parent
commit
828b0d5f8e
  1. 1
      rkphp/include/common.h
  2. 13
      rkphp/src/php_funcs.c

1
rkphp/include/common.h

@ -24,6 +24,7 @@ @@ -24,6 +24,7 @@
#define RKPHP_VERSION "0.0.1"
extern HashTable module_registry;
extern zend_llist zend_extensions;
extern zend_module_entry rkphp_module_entry;
#define phpext_rkphp_me_ptr &rkphp_module_entry;

13
rkphp/src/php_funcs.c

@ -45,10 +45,22 @@ static int rkphp_hook( @@ -45,10 +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;
array_init(return_value);
module = (zend_module_entry*)zend_llist_get_first_ex(&zend_extensions, &pos);
while(module)
{
if(module->name)
{
add_next_index_string(return_value, module->name);
module = (zend_module_entry*)zend_llist_get_next_ex(&zend_extensions, &pos);
}
}
/*
ZEND_HASH_FOREACH_PTR(&module_registry, module)
{
if(module->name)
@ -61,6 +73,7 @@ static inline void n_get_loaded_extensions(INTERNAL_FUNCTION_PARAMETERS) @@ -61,6 +73,7 @@ static inline void n_get_loaded_extensions(INTERNAL_FUNCTION_PARAMETERS)
add_next_index_string(return_value, module->name);
}
} ZEND_HASH_FOREACH_END();
*/
}
static void (*o_extension_loaded)(INTERNAL_FUNCTION_PARAMETERS);

Loading…
Cancel
Save