Skip to content

Commit 0bfb534

Browse files
committed
PHON-31: Do not overload the stream_initiator with tsrm, we want it for stream context later
1 parent 2aa41c0 commit 0bfb534

File tree

3 files changed

+3
-5
lines changed

3 files changed

+3
-5
lines changed

php_phongo.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -814,7 +814,7 @@ mongoc_stream_t* phongo_stream_initiator(const mongoc_uri_t *uri, const mongoc_h
814814
int errcode;
815815
char *dsn;
816816
int dsn_len;
817-
(void)user_data;TSRMLS_FETCH_FROM_CTX(user_data);
817+
TSRMLS_FETCH();
818818

819819

820820
switch (host->family) {

src/MongoDB/Manager.c

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -55,8 +55,7 @@ PHP_METHOD(Manager, __construct)
5555
int uri_len;
5656
zval *options = NULL;
5757
zval *driverOptions = NULL;
58-
void ***ctx = NULL;
59-
TSRMLS_SET_CTX(ctx);
58+
php_stream_context *ctx = NULL;
6059

6160

6261
zend_replace_error_handling(EH_THROW, phongo_exception_from_phongo_domain(PHONGO_ERROR_INVALID_ARGUMENT), &error_handling TSRMLS_CC);

src/MongoDB/Server.c

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -59,8 +59,7 @@ PHP_METHOD(Server, __construct)
5959
zval *options = NULL;
6060
zval *driverOptions = NULL;
6161
mongoc_uri_t *uri;
62-
void ***ctx = NULL;
63-
TSRMLS_SET_CTX(ctx);
62+
php_stream_context *ctx = NULL;
6463

6564

6665
zend_replace_error_handling(EH_THROW, phongo_exception_from_phongo_domain(PHONGO_ERROR_INVALID_ARGUMENT), &error_handling TSRMLS_CC);

0 commit comments

Comments
 (0)