summaryrefslogtreecommitdiff
path: root/ext
diff options
context:
space:
mode:
Diffstat (limited to 'ext')
-rw-r--r--ext/bcmath/bcmath.c30
-rw-r--r--ext/bcmath/php_bcmath.h2
-rw-r--r--ext/iconv/config.m42
-rw-r--r--ext/oci8/oci8.c4
-rw-r--r--ext/odbc/php_odbc.c2
-rw-r--r--ext/soap/soap.c97
-rw-r--r--ext/standard/strnatcmp.c6
-rw-r--r--ext/standard/tests/strings/bug29075.phpt14
-rw-r--r--ext/tidy/tidy.c2
9 files changed, 27 insertions, 132 deletions
diff --git a/ext/bcmath/bcmath.c b/ext/bcmath/bcmath.c
index 94d3b90d59..b4f5de75e5 100644
--- a/ext/bcmath/bcmath.c
+++ b/ext/bcmath/bcmath.c
@@ -53,8 +53,8 @@ zend_module_entry bcmath_module_entry = {
bcmath_functions,
PHP_MINIT(bcmath),
PHP_MSHUTDOWN(bcmath),
- PHP_RINIT(bcmath),
- PHP_RSHUTDOWN(bcmath),
+ NULL,
+ NULL,
PHP_MINFO(bcmath),
NO_VERSION_YET,
STANDARD_MODULE_PROPERTIES
@@ -86,41 +86,25 @@ PHP_MINIT_FUNCTION(bcmath)
REGISTER_INI_ENTRIES();
- return SUCCESS;
-}
-/* }}} */
-
-/* {{{ PHP_MSHUTDOWN_FUNCTION
- */
-PHP_MSHUTDOWN_FUNCTION(bcmath)
-{
- UNREGISTER_INI_ENTRIES();
-
- return SUCCESS;
-}
-/* }}} */
-
-/* {{{ PHP_RINIT_FUNCTION
- */
-PHP_RINIT_FUNCTION(bcmath)
-{
bc_init_numbers(TSRMLS_C);
return SUCCESS;
}
/* }}} */
-/* {{{ PHP_RSHUTDOWN_FUNCTION
+/* {{{ PHP_MSHUTDOWN_FUNCTION
*/
-PHP_RSHUTDOWN_FUNCTION(bcmath)
+PHP_MSHUTDOWN_FUNCTION(bcmath)
{
_bc_free_num_ex(&BCG(_zero_), 1);
_bc_free_num_ex(&BCG(_one_), 1);
_bc_free_num_ex(&BCG(_two_), 1);
+ UNREGISTER_INI_ENTRIES();
+
return SUCCESS;
}
-/* }}} */
+/* }}} */
/* {{{ PHP_MINFO_FUNCTION
*/
diff --git a/ext/bcmath/php_bcmath.h b/ext/bcmath/php_bcmath.h
index c99fd2534c..32d005e226 100644
--- a/ext/bcmath/php_bcmath.h
+++ b/ext/bcmath/php_bcmath.h
@@ -30,8 +30,6 @@ extern zend_module_entry bcmath_module_entry;
PHP_MINIT_FUNCTION(bcmath);
PHP_MSHUTDOWN_FUNCTION(bcmath);
-PHP_RINIT_FUNCTION(bcmath);
-PHP_RSHUTDOWN_FUNCTION(bcmath);
PHP_MINFO_FUNCTION(bcmath);
PHP_FUNCTION(bcadd);
diff --git a/ext/iconv/config.m4 b/ext/iconv/config.m4
index 6f49e423f2..b8f8056dd5 100644
--- a/ext/iconv/config.m4
+++ b/ext/iconv/config.m4
@@ -3,7 +3,7 @@ dnl $Id$
dnl
PHP_ARG_WITH(iconv, for iconv support,
-[ --without-iconv[=DIR] Exclude iconv support], yes)
+[ --without-iconv[=DIR] Include iconv support], yes)
if test "$PHP_ICONV" != "no"; then
diff --git a/ext/oci8/oci8.c b/ext/oci8/oci8.c
index 597b177a49..04f697950e 100644
--- a/ext/oci8/oci8.c
+++ b/ext/oci8/oci8.c
@@ -2673,13 +2673,13 @@ static oci_session *_oci_open_session(oci_server* server,char *username,char *pa
smart_str_0(&hashed_details);
if (!exclusive) {
- mutex_lock(mx_lock);
if (zend_ts_hash_find(persistent_sessions, hashed_details.c, hashed_details.len+1, (void **) &session_list) != SUCCESS) {
zend_llist tmp;
/* first session, set up a session list */
zend_llist_init(&tmp, sizeof(oci_session), (llist_dtor_func_t) _session_pcleanup, 1);
zend_ts_hash_update(persistent_sessions, hashed_details.c, hashed_details.len+1, &tmp, sizeof(zend_llist), (void **) &session_list);
} else {
+ mutex_lock(mx_lock);
/* session list found, search for an idle session or an already opened session by the current thread */
session = zend_llist_get_first(session_list);
@@ -2692,6 +2692,7 @@ static oci_session *_oci_open_session(oci_server* server,char *username,char *pa
session->thread = thread_id();
}
+ mutex_unlock(mx_lock);
}
if (session) {
@@ -2706,7 +2707,6 @@ static oci_session *_oci_open_session(oci_server* server,char *username,char *pa
/* breakthru to open */
}
}
- mutex_unlock(mx_lock);
}
session = ecalloc(1,sizeof(oci_session));
diff --git a/ext/odbc/php_odbc.c b/ext/odbc/php_odbc.c
index 0908ce6a5b..4d0c00c4ca 100644
--- a/ext/odbc/php_odbc.c
+++ b/ext/odbc/php_odbc.c
@@ -3038,7 +3038,7 @@ PHP_FUNCTION(odbc_foreignkeys)
fschema = Z_STRVAL_PP(pv_fschema);
convert_to_string_ex(pv_ftable);
ftable = Z_STRVAL_PP(pv_ftable);
-#if defined(HAVE_DBMAKER) || defined (HAVE_IBMDB2)
+#ifdef HAVE_DBMAKER
#define EMPTY_TO_NULL(xstr) \
if ((int)strlen((xstr)) == 0) (xstr) = NULL
diff --git a/ext/soap/soap.c b/ext/soap/soap.c
index 1472658121..721b03149f 100644
--- a/ext/soap/soap.c
+++ b/ext/soap/soap.c
@@ -624,8 +624,7 @@ PHP_FUNCTION(soap_encode_to_zval)
}
#endif
-/* {{{ proto object SoapParam::SoapParam ( mixed data, string name)
- SoapParam constructor */
+/* SoapParam functions */
PHP_METHOD(SoapParam, SoapParam)
{
zval *data;
@@ -642,11 +641,8 @@ PHP_METHOD(SoapParam, SoapParam)
add_property_stringl(this_ptr, "param_name", name, name_length, 1);
add_property_zval(this_ptr, "param_data", data);
}
-/* }}} */
-
-/* {{{ proto object SoapHeader::SoapHeader ( string namespace, string name [, mixed data [, bool mustUnderstand [, mixed actor]]])
- SoapHeader constructor */
+/* SoapHeader functions */
PHP_METHOD(SoapHeader, SoapHeader)
{
zval *data = NULL, *actor = NULL;
@@ -677,8 +673,7 @@ PHP_METHOD(SoapHeader, SoapHeader)
}
}
-/* {{{ proto object SoapFault::SoapFault ( string faultcode, string faultstring [, string faultactor [, mixed detail [, string faultname [, mixed headerfault]]]])
- SoapFault constructor */
+/* SoapFault functions */
PHP_METHOD(SoapFault, SoapFault)
{
char *fault_string = NULL, *fault_code = NULL, *fault_actor = NULL, *name = NULL;
@@ -698,12 +693,8 @@ PHP_METHOD(SoapFault, SoapFault)
add_property_zval(this_ptr, "headerfault", headerfault);
}
}
-/* }}} */
-
#ifdef ZEND_ENGINE_2
-/* {{{ proto object SoapFault::SoapFault ( string faultcode, string faultstring [, string faultactor [, mixed detail [, string faultname [, mixed headerfault]]]])
- SoapFault constructor */
PHP_METHOD(SoapFault, __toString)
{
zval *faultcode, *faultstring, *file, *line, *trace;
@@ -739,11 +730,9 @@ PHP_METHOD(SoapFault, __toString)
RETURN_STRINGL(str, len, 0);
}
-/* }}} */
#endif
-/* {{{ proto object SoapVar::SoapVar ( mixed data, int encoding [, string type_name [, string type_namespace [, string node_name [, string node_namespace]]]])
- SoapVar constructor */
+/* SoapVar functions */
PHP_METHOD(SoapVar, SoapVar)
{
zval *data, *type;
@@ -784,11 +773,8 @@ PHP_METHOD(SoapVar, SoapVar)
add_property_stringl(this_ptr, "enc_namens", namens, namens_len, 1);
}
}
-/* }}} */
-
-/* {{{ proto object SoapServer::SoapServer ( mixed wsdl [, array options])
- SoapServer constructor */
+/* SoapServer functions */
PHP_METHOD(SoapServer, SoapServer)
{
soapServicePtr service;
@@ -863,8 +849,6 @@ PHP_METHOD(SoapServer, SoapServer)
SOAP_SERVER_END_CODE();
}
-/* }}} */
-
#define NULL_OR_STRING(zval) \
(!zval || Z_TYPE_P(zval) == IS_NULL || Z_TYPE_P(zval) == IS_STRING)
@@ -986,9 +970,6 @@ PHP_FUNCTION(PHP_SOAP_SERVER_CLASS, map)
}
#endif
-
-/* {{{ proto object SoapServer::SoapServer ( mixed wsdl [, array options])
- Sets persistence mode of SoapServer */
PHP_METHOD(SoapServer, setPersistence)
{
soapServicePtr service;
@@ -1013,11 +994,7 @@ PHP_METHOD(SoapServer, setPersistence)
SOAP_SERVER_END_CODE();
}
-/* }}} */
-
-/* {{{ proto void SoapServer::setClass(string class_name [, mixed args])
- Sets class which will handle SOAP requests */
PHP_METHOD(SoapServer, setClass)
{
soapServicePtr service;
@@ -1077,11 +1054,7 @@ PHP_METHOD(SoapServer, setClass)
SOAP_SERVER_END_CODE();
}
-/* }}} */
-
-/* {{{ proto array SoapServer::getFunctions(void)
- Returns list of defined functions */
PHP_METHOD(SoapServer, getFunctions)
{
soapServicePtr service;
@@ -1119,11 +1092,7 @@ PHP_METHOD(SoapServer, getFunctions)
SOAP_SERVER_END_CODE();
}
-/* }}} */
-
-/* {{{ proto void SoapServer::addFunction(mixed functions)
- Adds one or several functions those will handle SOAP requests */
PHP_METHOD(SoapServer, addFunction)
{
soapServicePtr service;
@@ -1213,11 +1182,7 @@ PHP_METHOD(SoapServer, addFunction)
SOAP_SERVER_END_CODE();
}
-/* }}} */
-
-/* {{{ proto void SoapServer::handle ( [string soap_request])
- Handles a SOAP request */
PHP_METHOD(SoapServer, handle)
{
int soap_version, old_soap_version;
@@ -1666,11 +1631,7 @@ fail:
SOAP_SERVER_END_CODE();
}
-/* }}} */
-
-/* {{{ proto SoapServer::fault
- SoapServer::fault */
PHP_METHOD(SoapServer, fault)
{
char *code, *string, *actor=NULL, *name=NULL;
@@ -1688,7 +1649,6 @@ PHP_METHOD(SoapServer, fault)
soap_server_fault(code, string, actor, details, name TSRMLS_CC);
SOAP_SERVER_END_CODE();
}
-/* }}} */
static void soap_server_fault_ex(sdlFunctionPtr function, zval* fault, soapHeader *hdr TSRMLS_DC)
{
@@ -1826,9 +1786,9 @@ PHP_FUNCTION(is_soap_fault)
}
/* SoapClient functions */
-
-/* {{{ proto object SoapClient::SoapClient ( mixed wsdl [, array options])
- SoapClient constructor */
+/*
+ SoapClient($wsdl, $options=array())
+*/
PHP_METHOD(SoapClient, SoapClient)
{
@@ -1961,14 +1921,13 @@ PHP_METHOD(SoapClient, SoapClient)
SOAP_CLIENT_END_CODE();
}
-/* }}} */
static int do_request(zval *this_ptr, xmlDoc *request, char *location, char *action, int version, zval *response TSRMLS_DC)
{
- int ret = TRUE;
- char *buf;
- int buf_size;
- zval func, param0, param1, param2, param3;
+ int ret = TRUE;
+ char *buf;
+ int buf_size;
+ zval func, param0, param1, param2, param3;
zval *params[4];
zval **trace;
zval **fault;
@@ -2164,9 +2123,6 @@ static void do_soap_call(zval* this_ptr,
SOAP_CLIENT_END_CODE();
}
-
-/* {{{ proto mixed SoapClient::__call ( string function_name [, array arguments [, array options [, array input_headers [, array output_headers]]]])
- Calls a SOAP function */
PHP_METHOD(SoapClient, __call)
{
char *function, *soap_action = NULL, *uri = NULL;
@@ -2249,11 +2205,7 @@ PHP_METHOD(SoapClient, __call)
efree(soap_headers);
}
}
-/* }}} */
-
-/* {{{ proto array SoapClient::__getFunctions ( void )
- Returns list of SOAP functions */
PHP_METHOD(SoapClient, __getFunctions)
{
sdlPtr sdl;
@@ -2275,11 +2227,7 @@ PHP_METHOD(SoapClient, __getFunctions)
}
}
}
-/* }}} */
-
-/* {{{ proto array SoapClient::__getTypes ( void )
- Returns list of SOAP types */
PHP_METHOD(SoapClient, __getTypes)
{
sdlPtr sdl;
@@ -2303,11 +2251,7 @@ PHP_METHOD(SoapClient, __getTypes)
}
}
}
-/* }}} */
-
-/* {{{ proto string SoapClient::__getLastRequest ( void )
- Returns last SOAP request */
PHP_METHOD(SoapClient, __getLastRequest)
{
zval **tmp;
@@ -2317,11 +2261,7 @@ PHP_METHOD(SoapClient, __getLastRequest)
}
RETURN_NULL();
}
-/* }}} */
-
-/* {{{ proto object SoapClient::__getLastResponse ( void )
- Returns last SOAP response */
PHP_METHOD(SoapClient, __getLastResponse)
{
zval **tmp;
@@ -2331,11 +2271,7 @@ PHP_METHOD(SoapClient, __getLastResponse)
}
RETURN_NULL();
}
-/* }}} */
-
-/* {{{ proto string SoapClient::__getLastRequestHeaders(void)
- Returns last SOAP request headers */
PHP_METHOD(SoapClient, __getLastRequestHeaders)
{
zval **tmp;
@@ -2345,11 +2281,7 @@ PHP_METHOD(SoapClient, __getLastRequestHeaders)
}
RETURN_NULL();
}
-/* }}} */
-
-/* {{{ proto string SoapClient::__getLastResponseHeaders(void)
- Returns last SOAP response headers */
PHP_METHOD(SoapClient, __getLastResponseHeaders)
{
zval **tmp;
@@ -2359,11 +2291,7 @@ PHP_METHOD(SoapClient, __getLastResponseHeaders)
}
RETURN_NULL();
}
-/* }}} */
-
-/* {{{ proto string SoapClient::__doRequest()
- SoapClient::__doRequest() */
PHP_METHOD(SoapClient, __doRequest)
{
char *buf, *location, *action;
@@ -2384,7 +2312,6 @@ PHP_METHOD(SoapClient, __doRequest)
}
RETURN_NULL();
}
-/* }}} */
#ifndef ZEND_ENGINE_2
static void soap_call_function_handler(INTERNAL_FUNCTION_PARAMETERS, zend_property_reference *property_reference)
diff --git a/ext/standard/strnatcmp.c b/ext/standard/strnatcmp.c
index e1f491a3df..f0cc8f8672 100644
--- a/ext/standard/strnatcmp.c
+++ b/ext/standard/strnatcmp.c
@@ -153,13 +153,13 @@ PHPAPI int strnatcmp_ex(char const *a, size_t a_len, char const *b, size_t b_len
return +1;
++ap; ++bp;
- if (ap >= aend && bp >= bend)
+ if (ap == aend && bp == bend)
/* The strings compare the same. Perhaps the caller
will want to call strcmp to break the tie. */
return 0;
- else if (ap >= aend)
+ else if (ap == aend)
return -1;
- else if (bp >= bend)
+ else if (bp == bend)
return 1;
}
}
diff --git a/ext/standard/tests/strings/bug29075.phpt b/ext/standard/tests/strings/bug29075.phpt
deleted file mode 100644
index 7fe7da6c49..0000000000
--- a/ext/standard/tests/strings/bug29075.phpt
+++ /dev/null
@@ -1,14 +0,0 @@
---TEST--
-Bug #29075 (strnatcmp() incorrectly handles whitespace)
---FILE--
-<?php
- var_dump(
- strnatcmp('foo ', 'foo '),
- strnatcmp('foo', 'foo'),
- strnatcmp(' foo', ' foo')
- );
-?>
---EXPECT--
-int(0)
-int(0)
-int(0)
diff --git a/ext/tidy/tidy.c b/ext/tidy/tidy.c
index 8299e0b1f9..babf040401 100644
--- a/ext/tidy/tidy.c
+++ b/ext/tidy/tidy.c
@@ -37,7 +37,7 @@
#include "tidy.h"
#include "buffio.h"
-#define PHP_TIDY_MODULE_VERSION "2.0"
+#define PHP_TIDY_MODULE_VERSION "2.0-dev"
/* {{{ ext/tidy macros
*/