Skip to content

Commit 1675a45

Browse files
committed
Remove macros for PHP 5.3 compatibility
These macros are obsolete, as PHP 5.3 support was removed before the 1.0.0 release.
1 parent e06c96d commit 1675a45

File tree

2 files changed

+1
-17
lines changed

2 files changed

+1
-17
lines changed

phongo_compat.h

Lines changed: 0 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -43,15 +43,8 @@
4343
# define HASH_KEY_NON_EXISTENT HASH_KEY_NON_EXISTANT
4444
#endif
4545

46-
#if PHP_VERSION_ID < 50400
47-
# define object_properties_init(_std, _class_type) \
48-
zend_hash_copy(*_std.properties, &class_type->default_properties, (copy_ctor_func_t) zval_add_ref, NULL, sizeof(zval *));
49-
#endif
50-
5146
#if PHP_VERSION_ID >= 70000
5247
# define str_efree(s) efree((char*)s)
53-
#elif PHP_VERSION_ID < 50400
54-
# define str_efree(s) efree((char*)s)
5548
#else
5649
# include <Zend/zend_string.h>
5750
#endif
@@ -102,15 +95,6 @@
10295
# endif
10396
#endif
10497

105-
#if PHP_VERSION_ID < 50400
106-
# define GET_DEFAULT_CONTEXT() \
107-
ctx = FG(default_context) ? FG(default_context) : php_stream_context_alloc()
108-
#else
109-
# define GET_DEFAULT_CONTEXT() \
110-
ctx = FG(default_context) ? FG(default_context) : php_stream_context_alloc(TSRMLS_C)
111-
#endif
112-
113-
11498
#ifndef php_ignore_value
11599
# if defined(__GNUC__) && __GNUC__ >= 4
116100
# define php_ignore_value(x) (({ __typeof__ (x) __x = (x); (void) __x; }))

php_phongo.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1940,7 +1940,7 @@ static mongoc_client_t *php_phongo_make_mongo_client(php_phongo_manager_t *manag
19401940
ctx = php_stream_context_from_zval(*tmp, 0);
19411941
#endif
19421942
} else {
1943-
GET_DEFAULT_CONTEXT();
1943+
ctx = FG(default_context) ? FG(default_context) : php_stream_context_alloc(TSRMLS_C);
19441944
}
19451945

19461946
if (mongoc_uri_get_ssl(uri)) {

0 commit comments

Comments
 (0)