Skip to content

Commit 7013644

Browse files
committed
Revert commit r319729 until I have a clean version for non-ZTS
1 parent 89193ec commit 7013644

File tree

8 files changed

+3
-208
lines changed

8 files changed

+3
-208
lines changed

NEWS

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6,8 +6,6 @@ PHP NEWS
66
. World domination
77

88
- cURL:
9-
. Implemented FR #55540, added functions curl_share_init(),
10-
curl_share_setopt() and curl_share_close(). (Pierrick)
119
. Added support for CURLOPT_FTP_RESPONSE_TIMEOUT, CURLOPT_APPEND,
1210
CURLOPT_DIRLISTONLY, CURLOPT_NEW_DIRECTORY_PERMS, CURLOPT_NEW_FILE_PERMS,
1311
CURLOPT_NETRC_FILE, CURLOPT_PREQUOTE, CURLOPT_KRBLEVEL, CURLOPT_MAXFILESIZE,
@@ -27,7 +25,7 @@ PHP NEWS
2725
CURLOPT_TRANSFER_ENCODING, CURLOPT_DNS_SERVERS and CURLOPT_USE_SSL.
2826
(Pierrick)
2927
. Fixed bug #55635 (CURLOPT_BINARYTRANSFER no longer used. The constant
30-
still exists for backward compatibility but is doing nothing). (Pierrick)
28+
still exists for backward compatibility but is doing nothing). (Pierrick)
3129
. Fixed bug #54995 (Missing CURLINFO_RESPONSE_CODE support). (Pierrick)
3230

3331
<<< NOTE: Insert NEWS from last stable release here prior to actual release! >>>

ext/curl/config.m4

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -156,6 +156,6 @@ int main(int argc, char *argv[])
156156
AC_DEFINE(PHP_CURL_URL_WRAPPERS,1,[ ])
157157
fi
158158

159-
PHP_NEW_EXTENSION(curl, interface.c multi.c share.c streams.c, $ext_shared)
159+
PHP_NEW_EXTENSION(curl, interface.c multi.c streams.c, $ext_shared)
160160
PHP_SUBST(CURL_SHARED_LIBADD)
161161
fi

ext/curl/config.w32

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ if (PHP_CURL != "no") {
1313
&& (((PHP_ZLIB=="no") && (CHECK_LIB("zlib_a.lib;zlib.lib", "curl", PHP_CURL))) ||
1414
(PHP_ZLIB_SHARED && CHECK_LIB("zlib.lib", "curl", PHP_CURL)) || (PHP_ZLIB == "yes" && (!PHP_ZLIB_SHARED)))
1515
) {
16-
EXTENSION("curl", "interface.c multi.c share.c streams.c", true);
16+
EXTENSION("curl", "interface.c multi.c streams.c", true);
1717
AC_DEFINE('HAVE_CURL', 1, 'Have cURL library');
1818
AC_DEFINE('HAVE_CURL_SSL', 1, 'Have SSL suppurt in cURL');
1919
AC_DEFINE('HAVE_CURL_EASY_STRERROR', 1, 'Have curl_easy_strerror in cURL');

ext/curl/curl.dsp

Lines changed: 0 additions & 4 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

ext/curl/interface.c

Lines changed: 0 additions & 35 deletions
Original file line numberDiff line numberDiff line change
@@ -90,7 +90,6 @@
9090

9191
int le_curl;
9292
int le_curl_multi_handle;
93-
int le_curl_share_handle;
9493

9594
#ifdef PHP_CURL_NEED_OPENSSL_TSL /* {{{ */
9695
static MUTEX_T *php_curl_openssl_tsl = NULL;
@@ -349,19 +348,6 @@ ZEND_END_ARG_INFO()
349348
ZEND_BEGIN_ARG_INFO(arginfo_curl_multi_close, 0)
350349
ZEND_ARG_INFO(0, mh)
351350
ZEND_END_ARG_INFO()
352-
353-
ZEND_BEGIN_ARG_INFO(arginfo_curl_share_init, 0)
354-
ZEND_END_ARG_INFO()
355-
356-
ZEND_BEGIN_ARG_INFO(arginfo_curl_share_close, 0)
357-
ZEND_ARG_INFO(0, sh)
358-
ZEND_END_ARG_INFO()
359-
360-
ZEND_BEGIN_ARG_INFO(arginfo_curl_share_setopt, 0)
361-
ZEND_ARG_INFO(0, sh)
362-
ZEND_ARG_INFO(0, option)
363-
ZEND_ARG_INFO(0, value)
364-
ZEND_END_ARG_INFO()
365351
/* }}} */
366352

367353
/* {{{ curl_functions[]
@@ -385,9 +371,6 @@ const zend_function_entry curl_functions[] = {
385371
PHP_FE(curl_multi_getcontent, arginfo_curl_multi_getcontent)
386372
PHP_FE(curl_multi_info_read, arginfo_curl_multi_info_read)
387373
PHP_FE(curl_multi_close, arginfo_curl_multi_close)
388-
PHP_FE(curl_share_init, arginfo_curl_share_init)
389-
PHP_FE(curl_share_close, arginfo_curl_share_close)
390-
PHP_FE(curl_share_setopt, arginfo_curl_share_setopt)
391374
PHP_FE_END
392375
};
393376
/* }}} */
@@ -544,7 +527,6 @@ PHP_MINIT_FUNCTION(curl)
544527
{
545528
le_curl = zend_register_list_destructors_ex(_php_curl_close, NULL, "curl", module_number);
546529
le_curl_multi_handle = zend_register_list_destructors_ex(_php_curl_multi_close, NULL, "curl_multi", module_number);
547-
le_curl_share_handle = zend_register_list_destructors_ex(_php_curl_share_close, NULL, "curl_share", module_number);
548530

549531
REGISTER_INI_ENTRIES();
550532

@@ -1007,14 +989,6 @@ PHP_MINIT_FUNCTION(curl)
1007989
REGISTER_CURL_CONSTANT(CURLFTPMETHOD_SINGLECWD);
1008990
#endif
1009991

1010-
/* Constant for curl_share_setopt */
1011-
REGISTER_CURL_CONSTANT(CURLOPT_SHARE);
1012-
REGISTER_CURL_CONSTANT(CURLSHOPT_SHARE);
1013-
REGISTER_CURL_CONSTANT(CURLSHOPT_UNSHARE);
1014-
REGISTER_CURL_CONSTANT(CURL_LOCK_DATA_COOKIE);
1015-
REGISTER_CURL_CONSTANT(CURL_LOCK_DATA_DNS);
1016-
REGISTER_CURL_CONSTANT(CURL_LOCK_DATA_SSL_SESSION);
1017-
1018992
#ifdef PHP_CURL_NEED_OPENSSL_TSL
1019993
if (!CRYPTO_get_id_callback()) {
1020994
int i, c = CRYPTO_num_locks();
@@ -2443,15 +2417,6 @@ static int _php_curl_setopt(php_curl *ch, long option, zval **zvalue, zval *retu
24432417
curl_easy_setopt(ch->cp, CURLOPT_VERBOSE, 0);
24442418
}
24452419
break;
2446-
case CURLOPT_SHARE:
2447-
{
2448-
php_curlsh *sh = NULL;
2449-
ZEND_FETCH_RESOURCE(sh, php_curlsh *, zvalue, -1, le_curl_share_handle_name, le_curl_share_handle);
2450-
if (sh) {
2451-
curl_easy_setopt(ch->cp, CURLOPT_SHARE, sh->share);
2452-
}
2453-
}
2454-
24552420
}
24562421

24572422
SAVE_CURL_ERROR(ch, error);

ext/curl/package.xml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,6 @@ package.xml added to support installation using pear installer
3939
<file role="src" name="curl.dsp"/>
4040
<file role="src" name="interface.c"/>
4141
<file role="src" name="multi.c"/>
42-
<file role="src" name="share.c"/>
4342
<file role="src" name="streams.c"/>
4443
<file role="src" name="php_curl.h"/>
4544
</filelist>

ext/curl/php_curl.h

Lines changed: 0 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -53,8 +53,6 @@ extern int le_curl;
5353
#define le_curl_name "cURL handle"
5454
extern int le_curl_multi_handle;
5555
#define le_curl_multi_handle_name "cURL Multi Handle"
56-
extern int le_curl_share_handle;
57-
#define le_curl_share_handle_name "cURL Share Handle"
5856

5957
PHP_MINIT_FUNCTION(curl);
6058
PHP_MSHUTDOWN_FUNCTION(curl);
@@ -77,12 +75,7 @@ PHP_FUNCTION(curl_multi_exec);
7775
PHP_FUNCTION(curl_multi_getcontent);
7876
PHP_FUNCTION(curl_multi_info_read);
7977
PHP_FUNCTION(curl_multi_close);
80-
PHP_FUNCTION(curl_share_init);
81-
PHP_FUNCTION(curl_share_close);
82-
PHP_FUNCTION(curl_share_setopt);
83-
8478
void _php_curl_multi_close(zend_rsrc_list_entry * TSRMLS_DC);
85-
void _php_curl_share_close(zend_rsrc_list_entry * TSRMLS_DC);
8679

8780
typedef struct {
8881
zval *func_name;
@@ -152,11 +145,6 @@ typedef struct {
152145
zend_llist easyh;
153146
} php_curlm;
154147

155-
typedef struct {
156-
CURLSH *share;
157-
MUTEX_T locks[CURL_LOCK_DATA_LAST];
158-
} php_curlsh;
159-
160148
void _php_curl_cleanup_handle(php_curl *);
161149
void _php_curl_multi_cleanup_list(void *data);
162150
int _php_curl_verify_handlers(php_curl *ch, int reporterror TSRMLS_DC);

ext/curl/share.c

Lines changed: 0 additions & 151 deletions
This file was deleted.

0 commit comments

Comments
 (0)