Removed useless code

This commit is contained in:
stealth35
2012-06-27 17:57:06 +02:00
parent 48a0453865
commit 9229ef334d
2 changed files with 5 additions and 73 deletions
-18
View File
@@ -22,28 +22,10 @@
extern zend_module_entry twig_module_entry; extern zend_module_entry twig_module_entry;
#define phpext_twig_ptr &twig_module_entry #define phpext_twig_ptr &twig_module_entry
#ifdef PHP_WIN32
#define PHP_TWIG_API __declspec(dllexport)
#else
#define PHP_TWIG_API
#endif
#ifdef ZTS #ifdef ZTS
#include "TSRM.h" #include "TSRM.h"
#endif #endif
PHP_FUNCTION(twig_template_get_attributes); PHP_FUNCTION(twig_template_get_attributes);
PHP_MINIT_FUNCTION(twig);
PHP_MSHUTDOWN_FUNCTION(twig);
PHP_RINIT_FUNCTION(twig);
PHP_RSHUTDOWN_FUNCTION(twig);
PHP_MINFO_FUNCTION(twig);
#ifdef ZTS
#define TWIG_G(v) TSRMG(twig_globals_id, zend_twig_globals *, v)
#else
#define TWIG_G(v) (twig_globals.v)
#endif
#endif #endif
+5 -55
View File
@@ -17,8 +17,6 @@
#endif #endif
#include "php.h" #include "php.h"
#include "php_ini.h"
#include "ext/standard/info.h"
#include "php_twig.h" #include "php_twig.h"
#include "ext/standard/php_string.h" #include "ext/standard/php_string.h"
#include "ext/standard/php_smart_str.h" #include "ext/standard/php_smart_str.h"
@@ -47,19 +45,15 @@ zend_function_entry twig_functions[] = {
zend_module_entry twig_module_entry = { zend_module_entry twig_module_entry = {
#if ZEND_MODULE_API_NO >= 20010901
STANDARD_MODULE_HEADER, STANDARD_MODULE_HEADER,
#endif
"twig", "twig",
twig_functions, twig_functions,
PHP_MINIT(twig), NULL,
PHP_MSHUTDOWN(twig), NULL,
PHP_RINIT(twig), NULL,
PHP_RSHUTDOWN(twig), NULL,
PHP_MINFO(twig), NULL,
#if ZEND_MODULE_API_NO >= 20010901
PHP_TWIG_VERSION, PHP_TWIG_VERSION,
#endif
STANDARD_MODULE_PROPERTIES STANDARD_MODULE_PROPERTIES
}; };
@@ -68,50 +62,6 @@ zend_module_entry twig_module_entry = {
ZEND_GET_MODULE(twig) ZEND_GET_MODULE(twig)
#endif #endif
PHP_INI_BEGIN()
PHP_INI_END()
PHP_MINIT_FUNCTION(twig)
{
REGISTER_INI_ENTRIES();
return SUCCESS;
}
PHP_MSHUTDOWN_FUNCTION(twig)
{
UNREGISTER_INI_ENTRIES();
return SUCCESS;
}
PHP_RINIT_FUNCTION(twig)
{
return SUCCESS;
}
PHP_RSHUTDOWN_FUNCTION(twig)
{
return SUCCESS;
}
PHP_MINFO_FUNCTION(twig)
{
php_info_print_table_start();
php_info_print_table_header(2, "Twig support", "enabled");
php_info_print_table_row(2, "Version", PHP_TWIG_VERSION);
php_info_print_table_end();
DISPLAY_INI_ENTRIES();
}
int TWIG_ARRAY_KEY_EXISTS(zval *array, char* key, int key_len) int TWIG_ARRAY_KEY_EXISTS(zval *array, char* key, int key_len)
{ {
if (Z_TYPE_P(array) != IS_ARRAY) { if (Z_TYPE_P(array) != IS_ARRAY) {