]> granicus.if.org Git - php/commitdiff
remove PHP4 extension structure compat
authorJulien Pauli <jpauli@php.net>
Fri, 9 Jan 2015 14:07:04 +0000 (15:07 +0100)
committerJulien Pauli <jpauli@php.net>
Fri, 9 Jan 2015 14:07:04 +0000 (15:07 +0100)
ext/standard/dl.c

index 82baa4eaa36f2b59c351ad5fb8d30eace49d03fa..c6a1b78840d9df475f4dd514920b9a58b3a8a497 100644 (file)
@@ -182,46 +182,12 @@ PHPAPI int php_load_extension(char *filename, int type, int start_now)
        }
        module_entry = get_module();
        if (module_entry->zend_api != ZEND_MODULE_API_NO) {
-               /* Check for pre-4.1.0 module which has a slightly different module_entry structure :( */
-                       struct pre_4_1_0_module_entry {
-                               char *name;
-                               zend_function_entry *functions;
-                               int (*module_startup_func)(INIT_FUNC_ARGS);
-                               int (*module_shutdown_func)(SHUTDOWN_FUNC_ARGS);
-                               int (*request_startup_func)(INIT_FUNC_ARGS);
-                               int (*request_shutdown_func)(SHUTDOWN_FUNC_ARGS);
-                               void (*info_func)(ZEND_MODULE_INFO_FUNC_ARGS);
-                               int (*global_startup_func)(void);
-                               int (*global_shutdown_func)(void);
-                               int globals_id;
-                               int module_started;
-                               unsigned char type;
-                               void *handle;
-                               int module_number;
-                               unsigned char zend_debug;
-                               unsigned char zts;
-                               unsigned int zend_api;
-                       };
-
-                       const char *name;
-                       int zend_api;
-
-                       if ((((struct pre_4_1_0_module_entry *)module_entry)->zend_api > 20000000) &&
-                               (((struct pre_4_1_0_module_entry *)module_entry)->zend_api < 20010901)
-                       ) {
-                               name            = ((struct pre_4_1_0_module_entry *)module_entry)->name;
-                               zend_api        = ((struct pre_4_1_0_module_entry *)module_entry)->zend_api;
-                       } else {
-                               name            = module_entry->name;
-                               zend_api        = module_entry->zend_api;
-                       }
-
                        php_error_docref(NULL, error_type,
                                        "%s: Unable to initialize module\n"
                                        "Module compiled with module API=%d\n"
                                        "PHP    compiled with module API=%d\n"
                                        "These options need to match\n",
-                                       name, zend_api, ZEND_MODULE_API_NO);
+                                       module_entry->name, module_entry->zend_api, ZEND_MODULE_API_NO);
                        DL_UNLOAD(handle);
                        return FAILURE;
        }