From 518e2b46640409b98ef495db71b970bf320e4dfd Mon Sep 17 00:00:00 2001 From: Hannes Magnusson Date: Tue, 9 Dec 2014 16:39:43 -0800 Subject: [PATCH] I have no idea what made me make BSON\Pool --- config.m4 | 1 - old-docs/api/BSON/types.php | 1 - php_phongo.c | 1 - php_phongo_classes.h | 5 -- src/BSON/Pool.c | 113 ------------------------------------ 5 files changed, 121 deletions(-) delete mode 100644 src/BSON/Pool.c diff --git a/config.m4 b/config.m4 index aa38f0de..fa93fd64 100644 --- a/config.m4 +++ b/config.m4 @@ -146,7 +146,6 @@ if test "$PHONGO" != "no"; then src/BSON/MaxKey.c \ src/BSON/MinKey.c \ src/BSON/ObjectID.c \ - src/BSON/Pool.c \ src/BSON/Regex.c \ src/BSON/Timestamp.c \ src/BSON/UTCDatetime.c \ diff --git a/old-docs/api/BSON/types.php b/old-docs/api/BSON/types.php index e8bae141..ae17ba1e 100644 --- a/old-docs/api/BSON/types.php +++ b/old-docs/api/BSON/types.php @@ -110,7 +110,6 @@ namespace BSON { class Int32 implements Type {} class Int64 implements Type {} class Log implements Type {} - class Pool implements Type {} class MaxKey implements Type {} class MinKey implements Type {} diff --git a/php_phongo.c b/php_phongo.c index 901fe61e..e03df1be 100644 --- a/php_phongo.c +++ b/php_phongo.c @@ -1403,7 +1403,6 @@ PHP_MINIT_FUNCTION(phongo) PHP_MINIT(MaxKey)(INIT_FUNC_ARGS_PASSTHRU); PHP_MINIT(MinKey)(INIT_FUNC_ARGS_PASSTHRU); PHP_MINIT(ObjectID)(INIT_FUNC_ARGS_PASSTHRU); - PHP_MINIT(Pool)(INIT_FUNC_ARGS_PASSTHRU); PHP_MINIT(Regex)(INIT_FUNC_ARGS_PASSTHRU); PHP_MINIT(Timestamp)(INIT_FUNC_ARGS_PASSTHRU); PHP_MINIT(UTCDatetime)(INIT_FUNC_ARGS_PASSTHRU); diff --git a/php_phongo_classes.h b/php_phongo_classes.h index 4325ce80..bcd3dcbe 100644 --- a/php_phongo_classes.h +++ b/php_phongo_classes.h @@ -158,9 +158,6 @@ typedef struct { zend_object std; char oid[25]; } php_phongo_objectid_t; -typedef struct { - zend_object std; -} php_phongo_pool_t; typedef struct { zend_object std; char *pattern; @@ -205,7 +202,6 @@ extern PHONGO_API zend_class_entry *php_phongo_log_ce; extern PHONGO_API zend_class_entry *php_phongo_maxkey_ce; extern PHONGO_API zend_class_entry *php_phongo_minkey_ce; extern PHONGO_API zend_class_entry *php_phongo_objectid_ce; -extern PHONGO_API zend_class_entry *php_phongo_pool_ce; extern PHONGO_API zend_class_entry *php_phongo_regex_ce; extern PHONGO_API zend_class_entry *php_phongo_timestamp_ce; extern PHONGO_API zend_class_entry *php_phongo_utcdatetime_ce; @@ -234,7 +230,6 @@ PHP_MINIT_FUNCTION(Javascript); PHP_MINIT_FUNCTION(MaxKey); PHP_MINIT_FUNCTION(MinKey); PHP_MINIT_FUNCTION(ObjectID); -PHP_MINIT_FUNCTION(Pool); PHP_MINIT_FUNCTION(Regex); PHP_MINIT_FUNCTION(Timestamp); PHP_MINIT_FUNCTION(UTCDatetime); diff --git a/src/BSON/Pool.c b/src/BSON/Pool.c deleted file mode 100644 index 48195013..00000000 --- a/src/BSON/Pool.c +++ /dev/null @@ -1,113 +0,0 @@ -/* - +---------------------------------------------------------------------------+ - | PHP Driver for MongoDB | - +---------------------------------------------------------------------------+ - | Copyright 2013-2014 MongoDB, Inc. | - | | - | Licensed under the Apache License, Version 2.0 (the "License"); | - | you may not use this file except in compliance with the License. | - | You may obtain a copy of the License at | - | | - | http://www.apache.org/licenses/LICENSE-2.0 | - | | - | Unless required by applicable law or agreed to in writing, software | - | distributed under the License is distributed on an "AS IS" BASIS, | - | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | - | See the License for the specific language governing permissions and | - | limitations under the License. | - +---------------------------------------------------------------------------+ - | Copyright (c) 2014, MongoDB, Inc. | - +---------------------------------------------------------------------------+ -*/ - -#ifdef HAVE_CONFIG_H -# include "config.h" -#endif - -/* External libs */ -#include -#include - -/* PHP Core stuff */ -#include -#include -#include -#include -#include -/* Our Compatability header */ -#include "php_compat_53.h" - -/* Our stuffz */ -#include "php_phongo.h" -#include "php_bson.h" - - -PHONGO_API zend_class_entry *php_phongo_pool_ce; - - - -/* {{{ BSON\Pool */ - - -static zend_function_entry php_phongo_pool_me[] = { - PHP_FE_END -}; - -/* }}} */ - - -/* {{{ php_phongo_pool_t object handlers */ -static void php_phongo_pool_free_object(void *object TSRMLS_DC) /* {{{ */ -{ - php_phongo_pool_t *intern = (php_phongo_pool_t*)object; - - zend_object_std_dtor(&intern->std TSRMLS_CC); - - efree(intern); -} /* }}} */ - -zend_object_value php_phongo_pool_create_object(zend_class_entry *class_type TSRMLS_DC) /* {{{ */ -{ - zend_object_value retval; - php_phongo_pool_t *intern; - - intern = (php_phongo_pool_t *)emalloc(sizeof(php_phongo_pool_t)); - memset(intern, 0, sizeof(php_phongo_pool_t)); - - zend_object_std_init(&intern->std, class_type TSRMLS_CC); - object_properties_init(&intern->std, class_type); - - retval.handle = zend_objects_store_put(intern, (zend_objects_store_dtor_t) zend_objects_destroy_object, php_phongo_pool_free_object, NULL TSRMLS_CC); - retval.handlers = phongo_get_std_object_handlers(); - - return retval; -} /* }}} */ -/* }}} */ - -/* {{{ PHP_MINIT_FUNCTION */ -PHP_MINIT_FUNCTION(Pool) -{ - (void)type; /* We don't care if we are loaded via dl() or extension= */ - zend_class_entry ce; - - INIT_NS_CLASS_ENTRY(ce, "BSON", "Pool", php_phongo_pool_me); - ce.create_object = php_phongo_pool_create_object; - php_phongo_pool_ce = zend_register_internal_class(&ce TSRMLS_CC); - - zend_class_implements(php_phongo_pool_ce TSRMLS_CC, 1, php_phongo_type_ce); - - - return SUCCESS; -} -/* }}} */ - - - -/* - * Local variables: - * tab-width: 4 - * c-basic-offset: 4 - * End: - * vim600: noet sw=4 ts=4 fdm=marker - * vim<600: noet sw=4 ts=4 - */