Permalink
Browse files

Clean up build.

  • Loading branch information...
1 parent cb702a7 commit 5bf6dc93ba7ad61233dbb49bd261601c1eac4023 Andrei Zmievski committed Mar 16, 2009
Showing with 12 additions and 94 deletions.
  1. +10 −65 php_bloomy.c
  2. +2 −29 php_bloomy.h
View
@@ -18,27 +18,18 @@
#include "php_bloomy.h"
-#if HAVE_BLOOMY
-
-/* {{{ bloomy_functions[] */
-function_entry bloomy_functions[] = {
- { NULL, NULL, NULL }
-};
-/* }}} */
-
-
/* {{{ bloomy_module_entry
*/
zend_module_entry bloomy_module_entry = {
STANDARD_MODULE_HEADER,
"bloomy",
- bloomy_functions,
- PHP_MINIT(bloomy), /* Replace with NULL if there is nothing to do at php startup */
- PHP_MSHUTDOWN(bloomy), /* Replace with NULL if there is nothing to do at php shutdown */
- PHP_RINIT(bloomy), /* Replace with NULL if there is nothing to do at request start */
- PHP_RSHUTDOWN(bloomy), /* Replace with NULL if there is nothing to do at request end */
+ NULL,
+ NULL,
+ NULL,
+ NULL,
+ NULL,
PHP_MINFO(bloomy),
- "0.0.1dev",
+ PHP_BLOOMY_VERSION,
STANDARD_MODULE_PROPERTIES
};
/* }}} */
@@ -48,62 +39,16 @@ ZEND_GET_MODULE(bloomy)
#endif
-/* {{{ PHP_MINIT_FUNCTION */
-PHP_MINIT_FUNCTION(bloomy)
-{
-
- /* add your stuff here */
-
- return SUCCESS;
-}
-/* }}} */
-
-
-/* {{{ PHP_MSHUTDOWN_FUNCTION */
-PHP_MSHUTDOWN_FUNCTION(bloomy)
-{
-
- /* add your stuff here */
-
- return SUCCESS;
-}
-/* }}} */
-
-
-/* {{{ PHP_RINIT_FUNCTION */
-PHP_RINIT_FUNCTION(bloomy)
-{
- /* add your stuff here */
-
- return SUCCESS;
-}
-/* }}} */
-
-
-/* {{{ PHP_RSHUTDOWN_FUNCTION */
-PHP_RSHUTDOWN_FUNCTION(bloomy)
-{
- /* add your stuff here */
-
- return SUCCESS;
-}
-/* }}} */
-
-
/* {{{ PHP_MINFO_FUNCTION */
PHP_MINFO_FUNCTION(bloomy)
{
- php_info_print_box_start(0);
- php_printf("<p>The unknown extension</p>\n");
- php_printf("<p>Version 0.0.1devdevel (2009-03-16)</p>\n");
- php_info_print_box_end();
- /* add your stuff here */
-
+ php_info_print_table_start();
+ php_info_print_table_header(2, "bloomy support", "enabled");
+ php_info_print_table_row(2, "Version", PHP_BLOOMY_VERSION);
+ php_info_print_table_end();
}
/* }}} */
-#endif /* HAVE_BLOOMY */
-
/*
* Local variables:
View
@@ -19,28 +19,12 @@
#ifndef PHP_BLOOMY_H
#define PHP_BLOOMY_H
-#ifdef __cplusplus
-extern "C" {
-#endif
-
#ifdef HAVE_CONFIG_H
#include "config.h"
#endif
#include <php.h>
-
-#ifdef HAVE_BLOOMY
-
-#include <php_ini.h>
-#include <SAPI.h>
#include <ext/standard/info.h>
-#include <Zend/zend_extensions.h>
-#ifdef __cplusplus
-} // extern "C"
-#endif
-#ifdef __cplusplus
-extern "C" {
-#endif
extern zend_module_entry bloomy_module_entry;
#define phpext_bloomy_ptr &bloomy_module_entry
@@ -51,18 +35,10 @@ extern zend_module_entry bloomy_module_entry;
#define PHP_BLOOMY_API
#endif
-PHP_MINIT_FUNCTION(bloomy);
-PHP_MSHUTDOWN_FUNCTION(bloomy);
-PHP_RINIT_FUNCTION(bloomy);
-PHP_RSHUTDOWN_FUNCTION(bloomy);
-PHP_MINFO_FUNCTION(bloomy);
-
#ifdef ZTS
#include "TSRM.h"
#endif
-#define FREE_RESOURCE(resource) zend_list_delete(Z_LVAL_P(resource))
-
#define PROP_GET_LONG(name) Z_LVAL_P(zend_read_property(_this_ce, _this_zval, #name, strlen(#name), 1 TSRMLS_CC))
#define PROP_SET_LONG(name, l) zend_update_property_long(_this_ce, _this_zval, #name, strlen(#name), l TSRMLS_CC)
@@ -74,12 +50,9 @@ PHP_MINFO_FUNCTION(bloomy);
#define PROP_SET_STRING(name, s) zend_update_property_string(_this_ce, _this_zval, #name, strlen(#name), s TSRMLS_CC)
#define PROP_SET_STRINGL(name, s, l) zend_update_property_stringl(_this_ce, _this_zval, #name, strlen(#name), s, l TSRMLS_CC)
+#define PHP_BLOOMY_VERSION "0.1.0"
-#ifdef __cplusplus
-} // extern "C"
-#endif
-
-#endif /* PHP_HAVE_BLOOMY */
+PHP_MINFO_FUNCTION(bloomy);
#endif /* PHP_BLOOMY_H */

0 comments on commit 5bf6dc9

Please sign in to comment.