diff --git a/Makefile.frag b/Makefile.frag index cb53691ef..80fc01673 100644 --- a/Makefile.frag +++ b/Makefile.frag @@ -1,8 +1,8 @@ .PHONY: coverage testclean ChangeLog RELEASE package.xml docs DATE=`date +%Y-%m-%d--%H-%M-%S` -PHONGO_VERSION=`php -n -dextension=modules/phongo.so -r 'echo PHONGO_VERSION;'` -PHONGO_STABILITY=`php -n -dextension=modules/phongo.so -r 'echo PHONGO_STABILITY;'` +MONGODB_VERSION=`php -n -dextension=modules/mongodb.so -r 'echo MONGODB_VERSION;'` +MONGODB_STABILITY=`php -n -dextension=modules/mongodb.so -r 'echo MONGODB_STABILITY;'` LIB_PATH=vendor/mongodb/mongodb COMPOSER_ARGS=update --no-interaction --prefer-source PHPUNIT_ARGS=--process-isolation @@ -43,7 +43,7 @@ lcov-local: lcov --gcov-tool $(top_srcdir)/.llvm-cov.sh --capture --derive-func-data --directory . --output-file .coverage.lcov --no-external coverage: mv-coverage lcov-local - genhtml .coverage.lcov --legend --title "phongo code coverage" --output-directory coverage + genhtml .coverage.lcov --legend --title "mongodb code coverage" --output-directory coverage coveralls: mv-coverage lcov-coveralls @@ -101,14 +101,14 @@ testclean: find $(top_srcdir)/tests/$$group -type f -name "*.diff" -o -name "*.exp" -o -name "*.log" -o -name "*.mem" -o -name "*.out" -o -name "*.php" -o -name "*.sh" | xargs rm -f; \ done; -phongodep: +mongodbdep: release: test ChangeLog RELEASE package.xml pecl package package.xml @echo "Please run:" - @echo " " git add RELEASE-$(PHONGO_VERSION) - @echo " " git commit -m \"Add $(PHONGO_VERSION) release notes\" - @echo " " git tag -a -m \"Release $(PHONGO_VERSION)\" $(PHONGO_VERSION) + @echo " " git add RELEASE-$(MONGODB_VERSION) + @echo " " git commit -m \"Add $(MONGODB_VERSION) release notes\" + @echo " " git tag -a -m \"Release $(MONGODB_VERSION)\" $(MONGODB_VERSION) @echo " " git push --tags @echo " " make release-docs @echo "And don't forget to bump version in php_phongo.h" @@ -120,10 +120,10 @@ release-docs: docs mkdocs gh-deploy --clean package.xml: - php bin/prep-release.php $(PHONGO_VERSION)-$(PHONGO_STABILITY) + php bin/prep-release.php $(MONGODB_VERSION)-$(MONGODB_STABILITY) RELEASE: - @git log --pretty=format:"%ad %an <%ae>%n%x09* %s%n" --date short --since="$$(git show -s --format=%ad `git rev-list --tags --max-count=1`)" > RELEASE-$(PHONGO_VERSION) + @git log --pretty=format:"%ad %an <%ae>%n%x09* %s%n" --date short --since="$$(git show -s --format=%ad `git rev-list --tags --max-count=1`)" > RELEASE-$(MONGODB_VERSION) ChangeLog: @git log --pretty=format:"%ad %an <%ae>%n%x09* %s%n" --date short > ChangeLog diff --git a/bin/prep-release.php b/bin/prep-release.php index 3bbbfe7fc..3bca20e2a 100644 --- a/bin/prep-release.php +++ b/bin/prep-release.php @@ -200,7 +200,7 @@ function usage() { $NOTES = array(); foreach($fullnotes as $note) { $note = " " . str_replace("&", "&", trim($note)); - /* PHP phongo JIRA Project */ + /* PHP PHPC JIRA Project */ if (strstr($note, "PHPC-") !== false) { $NOTES[] = $note; continue; diff --git a/config.m4 b/config.m4 index bdbaf2ed0..95793e8cd 100644 --- a/config.m4 +++ b/config.m4 @@ -70,7 +70,7 @@ AC_DEFUN([PHP_BSON_CLOCK], MONGOC_SYMBOL_SUFFIX="priv" -if test "$PHONGO" != "no"; then +if test "$MONGODB" != "no"; then PHP_ARG_ENABLE(developer-flags, whether to enable developer build flags, [ --enable-developer-flags Enable developer flags],, no) @@ -126,10 +126,10 @@ if test "$PHONGO" != "no"; then EXTRA_LDFLAGS="$COVERAGE_CFLAGS" fi - PHONGO_BSON="\ + MONGODB_BSON="\ src/bson.c \ "; - PHONGO_BSON_CLASSES="\ + MONGODB_BSON_CLASSES="\ src/BSON/Type.c \ src/BSON/Unserializable.c \ src/BSON/Serializable.c \ @@ -143,10 +143,10 @@ if test "$PHONGO" != "no"; then src/BSON/Timestamp.c \ src/BSON/UTCDatetime.c \ "; - PHONGO_ROOT="\ + MONGODB_ROOT="\ php_phongo.c \ "; - PHONGO_MONGODB_CLASSES="\ + MONGODB_MONGODB_CLASSES="\ src/MongoDB/Command.c \ src/MongoDB/Cursor.c \ src/MongoDB/CursorId.c \ @@ -161,7 +161,7 @@ if test "$PHONGO" != "no"; then src/MongoDB/WriteError.c \ src/MongoDB/WriteResult.c \ "; - PHONGO_MONGODB_EXCEPTIONS="\ + MONGODB_MONGODB_EXCEPTIONS="\ src/MongoDB/Exception.c \ src/MongoDB/RuntimeException.c \ src/MongoDB/InvalidArgumentException.c \ @@ -268,15 +268,15 @@ MONGOC_SOURCES_SASL=mongoc-sasl.c if test "$ext_shared" = "no"; then - PHP_ADD_SOURCES(PHP_EXT_DIR(mongodb), $PHONGO_BSON) - PHP_ADD_SOURCES(PHP_EXT_DIR(mongodb), $PHONGO_BSON_CLASSES) - PHP_ADD_SOURCES(PHP_EXT_DIR(mongodb), $PHONGO_MONGODB_CLASSES) - PHP_ADD_SOURCES(PHP_EXT_DIR(mongodb), $PHONGO_MONGODB_EXCEPTIONS) + PHP_ADD_SOURCES(PHP_EXT_DIR(mongodb), $MONGODB_BSON) + PHP_ADD_SOURCES(PHP_EXT_DIR(mongodb), $MONGODB_BSON_CLASSES) + PHP_ADD_SOURCES(PHP_EXT_DIR(mongodb), $MONGODB_MONGODB_CLASSES) + PHP_ADD_SOURCES(PHP_EXT_DIR(mongodb), $MONGODB_MONGODB_EXCEPTIONS) else - PHP_ADD_SOURCES_X(PHP_EXT_DIR(mongodb), $PHONGO_BSON, [$STD_CFLAGS $MAINTAINER_CFLAGS $COVERAGE_CFLAGS], shared_objects_mongodb, yes) - PHP_ADD_SOURCES_X(PHP_EXT_DIR(mongodb), $PHONGO_BSON_CLASSES, [$STD_CFLAGS $MAINTAINER_CFLAGS $COVERAGE_CFLAGS], shared_objects_mongodb, yes) - PHP_ADD_SOURCES_X(PHP_EXT_DIR(mongodb), $PHONGO_MONGODB_CLASSES, [$STD_CFLAGS $MAINTAINER_CFLAGS $COVERAGE_CFLAGS], shared_objects_mongodb, yes) - PHP_ADD_SOURCES_X(PHP_EXT_DIR(mongodb), $PHONGO_MONGODB_EXCEPTIONS, [$STD_CFLAGS $MAINTAINER_CFLAGS $COVERAGE_CFLAGS], shared_objects_mongodb, yes) + PHP_ADD_SOURCES_X(PHP_EXT_DIR(mongodb), $MONGODB_BSON, [$STD_CFLAGS $MAINTAINER_CFLAGS $COVERAGE_CFLAGS], shared_objects_mongodb, yes) + PHP_ADD_SOURCES_X(PHP_EXT_DIR(mongodb), $MONGODB_BSON_CLASSES, [$STD_CFLAGS $MAINTAINER_CFLAGS $COVERAGE_CFLAGS], shared_objects_mongodb, yes) + PHP_ADD_SOURCES_X(PHP_EXT_DIR(mongodb), $MONGODB_MONGODB_CLASSES, [$STD_CFLAGS $MAINTAINER_CFLAGS $COVERAGE_CFLAGS], shared_objects_mongodb, yes) + PHP_ADD_SOURCES_X(PHP_EXT_DIR(mongodb), $MONGODB_MONGODB_EXCEPTIONS, [$STD_CFLAGS $MAINTAINER_CFLAGS $COVERAGE_CFLAGS], shared_objects_mongodb, yes) fi dnl libmongoc stuff {{{ @@ -293,7 +293,7 @@ dnl libmongoc stuff {{{ PHP_ADD_SOURCES_X(PHP_EXT_DIR(mongodb)[src/libmongoc/src/mongoc], $MONGOC_SOURCES_SSL, [$STD_CFLAGS], shared_objects_mongodb, yes) - PHP_SETUP_OPENSSL(PHONGO_SHARED_LIBADD) + PHP_SETUP_OPENSSL(MONGODB_SHARED_LIBADD) MONGOC_ENABLE_SSL=1 AC_SUBST(MONGOC_ENABLE_SSL) @@ -301,56 +301,56 @@ dnl libmongoc stuff {{{ PHP_ARG_WITH(mongodb-sasl, Build with Cyrus SASL support, [ --with-mongodb-sasl[=DIR] mongodb: Include Cyrus SASL support], auto, yes) -if test "$PHP_PHONGO_SASL" != "no"; then +if test "$PHP_MONGODB_SASL" != "no"; then AC_MSG_CHECKING(for SASL) - for i in $PHONGO_SASL /usr /usr/local; do + for i in $MONGODB_SASL /usr /usr/local; do if test -f $i/include/sasl/sasl.h; then - PHONGO_SASL_DIR=$i + MONGODB_SASL_DIR=$i AC_MSG_RESULT(found in $i) break fi done - if test -z "$PHONGO_SASL_DIR"; then + if test -z "$MONGODB_SASL_DIR"; then AC_MSG_RESULT(not found) - if test "$PHONGO_SASL" != "auto"; then + if test "$MONGODB_SASL" != "auto"; then AC_MSG_ERROR([sasl.h not found!]) fi fi PHP_CHECK_LIBRARY(sasl2, sasl_version, [ - PHP_ADD_INCLUDE($PHONGO_SASL_DIR) - PHP_ADD_LIBRARY_WITH_PATH(sasl2, $PHONGO_SASL_DIR/$PHP_LIBDIR, PHONGO_SHARED_LIBADD) + PHP_ADD_INCLUDE($MONGODB_SASL_DIR) + PHP_ADD_LIBRARY_WITH_PATH(sasl2, $MONGODB_SASL_DIR/$PHP_LIBDIR, MONGODB_SHARED_LIBADD) MONGOC_ENABLE_SASL=1 AC_SUBST(MONGOC_ENABLE_SASL) ], [ - if test "$PHONGO_SASL" != "auto"; then + if test "$MONGODB_SASL" != "auto"; then AC_MSG_ERROR([MONGO SASL check failed. Please check config.log for more information.]) fi ], [ - -L$PHONGO_SASL_DIR/$PHP_LIBDIR + -L$MONGODB_SASL_DIR/$PHP_LIBDIR ]) fi m4_include(src/libmongoc/build/autotools/m4/ax_pthread.m4) AX_PTHREAD AC_CHECK_FUNCS([shm_open], [SHM_LIB=], [AC_CHECK_LIB([rt], [shm_open], [SHM_LIB=-lrt], [SHM_LIB=])]) - PHONGO_SHARED_LIBADD="$PHONGO_SHARED_LIBADD $SHM_LIB" + MONGODB_SHARED_LIBADD="$MONGODB_SHARED_LIBADD $SHM_LIB" - dnl PHP_ADD_LIBRARY_WITH_PATH(bson-1.0, src/libbson/.libs, PHONGO_SHARED_LIBADD) - dnl PHP_ADD_LIBRARY_WITH_PATH(mongoc-priv, src/libmongoc/.libs, PHONGO_SHARED_LIBADD) + dnl PHP_ADD_LIBRARY_WITH_PATH(bson-1.0, src/libbson/.libs, MONGODB_SHARED_LIBADD) + dnl PHP_ADD_LIBRARY_WITH_PATH(mongoc-priv, src/libmongoc/.libs, MONGODB_SHARED_LIBADD) EXTRA_CFLAGS="$PTHREAD_CFLAGS $SASL_CFLAGS" PHP_SUBST(EXTRA_CFLAGS) PHP_SUBST(EXTRA_LDFLAGS) - PHONGO_SHARED_LIBADD="$PHONGO_SHARED_LIBADD $PTHREAD_LIBS $SASL_LIBS" - PHP_SUBST(PHONGO_SHARED_LIBADD) + MONGODB_SHARED_LIBADD="$MONGODB_SHARED_LIBADD $PTHREAD_LIBS $SASL_LIBS" + PHP_SUBST(MONGODB_SHARED_LIBADD) dnl }}} - PHP_NEW_EXTENSION(mongodb, $PHONGO_ROOT, $ext_shared,, [$STD_CFLAGS $MAINTAINER_CFLAGS $COVERAGE_CFLAGS]) + PHP_NEW_EXTENSION(mongodb, $MONGODB_ROOT, $ext_shared,, [$STD_CFLAGS $MAINTAINER_CFLAGS $COVERAGE_CFLAGS]) PHP_ADD_EXTENSION_DEP(mongodb, spl) m4_include(src/libbson/build/autotools/CheckAtomics.m4) @@ -372,8 +372,8 @@ dnl }}} PHP_ADD_BUILD_DIR([$ext_builddir/src/libbson/src/bson/]) PHP_ADD_BUILD_DIR([$ext_builddir/src/libmongoc/src/mongoc/]) - dnl PHONGO_SHARED_DEPENDENCIES="mongodbdep" - dnl PHP_SUBST(PHONGO_SHARED_DEPENDENCIES) + dnl MONGODB_SHARED_DEPENDENCIES="mongodbdep" + dnl PHP_SUBST(MONGODB_SHARED_DEPENDENCIES) PHP_BSON_BIGENDIAN AC_HEADER_STDBOOL @@ -440,7 +440,7 @@ Build configuration: Code Coverage flags (extra slow) : $COVERAGE_CFLAGS LDFLAGS : $LDFLAGS EXTRA_LDFLAGS : $EXTRA_LDFLAGS - PHONGO_SHARED_LIBADD : $PHONGO_SHARED_LIBADD + MONGODB_SHARED_LIBADD : $MONGODB_SHARED_LIBADD Please submit bugreports at: https://jira.mongodb.org/browse/PHP diff --git a/php_phongo.c b/php_phongo.c index a699b9802..17d1cf7c9 100644 --- a/php_phongo.c +++ b/php_phongo.c @@ -61,7 +61,7 @@ #undef MONGOC_LOG_DOMAIN #define MONGOC_LOG_DOMAIN "PHONGO" -ZEND_DECLARE_MODULE_GLOBALS(phongo) +ZEND_DECLARE_MODULE_GLOBALS(mongodb) /* {{{ phongo_std_object_handlers */ zend_object_handlers phongo_std_object_handlers; @@ -196,24 +196,24 @@ static void php_phongo_log(mongoc_log_level_t log_level, const char *log_domain, int fd = 0; char *dt = NULL; - if (!PHONGO_G(debug_log)) { + if (!MONGODB_G(debug_log)) { return; } - if (strcasecmp(PHONGO_G(debug_log), "off") == 0) { + if (strcasecmp(MONGODB_G(debug_log), "off") == 0) { return; } - if (strcasecmp(PHONGO_G(debug_log), "0") == 0) { + if (strcasecmp(MONGODB_G(debug_log), "0") == 0) { return; } #define PHONGO_DEBUG_LOG_FORMAT "[%s] %10s: %-8s> %s\n" dt = php_format_date((char *)"Y-m-d\\TH:i:sP", strlen("Y-m-d\\TH:i:sP"), time(NULL), 0 TSRMLS_CC); - if (strcasecmp(PHONGO_G(debug_log), "stderr") == 0) { + if (strcasecmp(MONGODB_G(debug_log), "stderr") == 0) { fprintf(stderr, PHONGO_DEBUG_LOG_FORMAT, dt, log_domain, mongoc_log_level_str(log_level), message); - } else if (strcasecmp(PHONGO_G(debug_log), "stdout") == 0) { + } else if (strcasecmp(MONGODB_G(debug_log), "stdout") == 0) { php_printf(PHONGO_DEBUG_LOG_FORMAT, dt, log_domain, mongoc_log_level_str(log_level), message); - } else if ((fd = VCWD_OPEN_MODE(PHONGO_G(debug_log), O_CREAT | O_APPEND | O_WRONLY, 0644)) != -1) { + } else if ((fd = VCWD_OPEN_MODE(MONGODB_G(debug_log), O_CREAT | O_APPEND | O_WRONLY, 0644)) != -1) { char *tmp; int len; @@ -1645,12 +1645,12 @@ void _phongo_debug_bson(bson_t *bson) /* {{{ INI entries */ PHP_INI_BEGIN() - STD_PHP_INI_ENTRY("phongo.debug_log", "", PHP_INI_ALL, OnUpdateString, debug_log, zend_phongo_globals, phongo_globals) + STD_PHP_INI_ENTRY("mongodb.debug_log", "", PHP_INI_ALL, OnUpdateString, debug_log, zend_mongodb_globals, mongodb_globals) PHP_INI_END() /* }}} */ /* {{{ PHP_GINIT_FUNCTION */ -PHP_GINIT_FUNCTION(phongo) +PHP_GINIT_FUNCTION(mongodb) { bson_mem_vtable_t bsonMemVTable = { php_phongo_malloc, @@ -1658,14 +1658,14 @@ PHP_GINIT_FUNCTION(phongo) php_phongo_realloc, php_phongo_free, }; - phongo_globals->debug_log = NULL; - phongo_globals->bsonMemVTable = bsonMemVTable; + mongodb_globals->debug_log = NULL; + mongodb_globals->bsonMemVTable = bsonMemVTable; } /* }}} */ /* {{{ PHP_MINIT_FUNCTION */ -PHP_MINIT_FUNCTION(phongo) +PHP_MINIT_FUNCTION(mongodb) { void ***ctx = NULL; TSRMLS_SET_CTX(ctx); @@ -1675,7 +1675,7 @@ PHP_MINIT_FUNCTION(phongo) REGISTER_INI_ENTRIES(); /* Initialize libbson */ - bson_mem_set_vtable(&PHONGO_G(bsonMemVTable)); + bson_mem_set_vtable(&MONGODB_G(bsonMemVTable)); /* Initialize libmongoc */ mongoc_init(); mongoc_log_set_handler(php_phongo_log, ctx); @@ -1733,15 +1733,15 @@ PHP_MINIT_FUNCTION(phongo) PHP_MINIT(Timestamp)(INIT_FUNC_ARGS_PASSTHRU); PHP_MINIT(UTCDatetime)(INIT_FUNC_ARGS_PASSTHRU); - REGISTER_STRING_CONSTANT("PHONGO_VERSION", (char *)PHONGO_VERSION_S, CONST_CS | CONST_PERSISTENT); - REGISTER_STRING_CONSTANT("PHONGO_STABILITY", (char *)PHONGO_STABILITY_S, CONST_CS | CONST_PERSISTENT); + REGISTER_STRING_CONSTANT("MONGODB_VERSION", (char *)MONGODB_VERSION_S, CONST_CS | CONST_PERSISTENT); + REGISTER_STRING_CONSTANT("MONGODB_STABILITY", (char *)MONGODB_STABILITY_S, CONST_CS | CONST_PERSISTENT); return SUCCESS; } /* }}} */ /* {{{ PHP_RINIT_FUNCTION */ -PHP_RINIT_FUNCTION(phongo) +PHP_RINIT_FUNCTION(mongodb) { (void)type; /* We don't care if we are loaded via dl() or extension= */ (void)module_number; /* Really doesn't matter which module number we are */ @@ -1751,7 +1751,7 @@ PHP_RINIT_FUNCTION(phongo) /* }}} */ /* {{{ PHP_RSHUTDOWN_FUNCTION */ -PHP_RSHUTDOWN_FUNCTION(phongo) +PHP_RSHUTDOWN_FUNCTION(mongodb) { (void)type; /* We don't care if we are loaded via dl() or extension= */ (void)module_number; /* Really doesn't matter which module number we are */ @@ -1761,7 +1761,7 @@ PHP_RSHUTDOWN_FUNCTION(phongo) /* }}} */ /* {{{ PHP_MSHUTDOWN_FUNCTION */ -PHP_MSHUTDOWN_FUNCTION(phongo) +PHP_MSHUTDOWN_FUNCTION(mongodb) { (void)type; /* We don't care if we are loaded via dl() or extension= */ @@ -1775,19 +1775,19 @@ PHP_MSHUTDOWN_FUNCTION(phongo) /* }}} */ /* {{{ PHP_GSHUTDOWN_FUNCTION */ -PHP_GSHUTDOWN_FUNCTION(phongo) +PHP_GSHUTDOWN_FUNCTION(mongodb) { - phongo_globals->debug_log = NULL; + mongodb_globals->debug_log = NULL; } /* }}} */ /* {{{ PHP_MINFO_FUNCTION */ -PHP_MINFO_FUNCTION(phongo) +PHP_MINFO_FUNCTION(mongodb) { php_info_print_table_start(); - php_info_print_table_header(2, "phongo support", "enabled"); - php_info_print_table_row(2, "phongo version", PHONGO_VERSION_S); - php_info_print_table_row(2, "phongo stability", PHONGO_STABILITY_S); + php_info_print_table_header(2, "mongodb support", "enabled"); + php_info_print_table_row(2, "mongodb version", MONGODB_VERSION_S); + php_info_print_table_row(2, "mongodb stability", MONGODB_STABILITY_S); php_info_print_table_row(2, "libmongoc version", MONGOC_VERSION_S); php_info_print_table_row(2, "libbson version", BSON_VERSION_S); php_info_print_table_end(); @@ -1798,7 +1798,7 @@ PHP_MINFO_FUNCTION(phongo) /* }}} */ -/* {{{ phongo_functions[] +/* {{{ mongodb_functions[] */ ZEND_BEGIN_ARG_INFO_EX(ai_bson_fromArray, 0, 0, 1) ZEND_ARG_INFO(0, array) @@ -1816,7 +1816,7 @@ ZEND_BEGIN_ARG_INFO_EX(ai_bson_fromJSON, 0, 0, 1) ZEND_ARG_INFO(0, json) ZEND_END_ARG_INFO(); -const zend_function_entry phongo_functions[] = { +const zend_function_entry mongodb_functions[] = { ZEND_NS_FE("BSON", fromArray, ai_bson_fromArray) ZEND_NS_FE("BSON", toArray, ai_bson_toArray) ZEND_NS_FE("BSON", toJSON, ai_bson_toJSON) @@ -1825,28 +1825,28 @@ const zend_function_entry phongo_functions[] = { }; /* }}} */ -/* {{{ phongo_module_entry +/* {{{ mongodb_module_entry */ -zend_module_entry phongo_module_entry = { +zend_module_entry mongodb_module_entry = { STANDARD_MODULE_HEADER, - "phongo", - phongo_functions, - PHP_MINIT(phongo), - PHP_MSHUTDOWN(phongo), - PHP_RINIT(phongo), - PHP_RSHUTDOWN(phongo), - PHP_MINFO(phongo), - PHONGO_VERSION, - PHP_MODULE_GLOBALS(phongo), - PHP_GINIT(phongo), - PHP_GSHUTDOWN(phongo), + "mongodb", + mongodb_functions, + PHP_MINIT(mongodb), + PHP_MSHUTDOWN(mongodb), + PHP_RINIT(mongodb), + PHP_RSHUTDOWN(mongodb), + PHP_MINFO(mongodb), + MONGODB_VERSION, + PHP_MODULE_GLOBALS(mongodb), + PHP_GINIT(mongodb), + PHP_GSHUTDOWN(mongodb), NULL, STANDARD_MODULE_PROPERTIES_EX }; /* }}} */ -#ifdef COMPILE_DL_PHONGO -ZEND_GET_MODULE(phongo) +#ifdef COMPILE_DL_MONGODB +ZEND_GET_MODULE(mongodb) #endif /* diff --git a/php_phongo.h b/php_phongo.h index 96909dba6..b82aa0cd3 100644 --- a/php_phongo.h +++ b/php_phongo.h @@ -25,13 +25,13 @@ #include #include -#define phpext_phongo_ptr &phongo_module_entry -extern zend_module_entry phongo_module_entry; +#define phpext_mongodb_ptr &mongodb_module_entry +extern zend_module_entry mongodb_module_entry; /* FIXME: Its annoying to bump version. Move into phongo_version.h.in */ -#define PHONGO_VERSION_S "0.2.0" -#define PHONGO_STABILITY_S "alpha" -#define PHONGO_VERSION PHONGO_VERSION_S +#define MONGODB_VERSION_S "0.2.0" +#define MONGODB_STABILITY_S "alpha" +#define MONGODB_VERSION MONGODB_VERSION_S #ifdef PHP_WIN32 # define PHONGO_API __declspec(dllexport) @@ -48,15 +48,15 @@ extern zend_module_entry phongo_module_entry; # define PHONGO_STREAM_CTX(x) NULL #endif -ZEND_BEGIN_MODULE_GLOBALS(phongo) +ZEND_BEGIN_MODULE_GLOBALS(mongodb) char *debug_log; bson_mem_vtable_t bsonMemVTable; -ZEND_END_MODULE_GLOBALS(phongo) +ZEND_END_MODULE_GLOBALS(mongodb) #ifdef ZTS -# define PHONGO_G(v) TSRMG(phongo_globals_id, zend_phongo_globals *, v) +# define MONGODB_G(v) TSRMG(mongodb_globals_id, zend_mongodb_globals *, v) #else -# define PHONGO_G(v) (phongo_globals.v) +# define MONGODB_G(v) (mongodb_globals.v) #endif #include "php_phongo_classes.h" diff --git a/tests/utils/basic-skipif.inc b/tests/utils/basic-skipif.inc index bf0dbab19..91cdbf66d 100644 --- a/tests/utils/basic-skipif.inc +++ b/tests/utils/basic-skipif.inc @@ -1,7 +1,7 @@