[PHP-CVS] cvs: php-src(PHP_5_0) /ext/standard dl.c

2005-03-21 Thread Anantha Kesari H Y
hyanantha   Mon Mar 21 03:34:38 2005 EDT

  Modified files:  (Branch: PHP_5_0)
/php-src/ext/standard   dl.c 
  Log:
  NetWare LibC headers have sys/param.h
  
  
http://cvs.php.net/diff.php/php-src/ext/standard/dl.c?r1=1.96.2.1r2=1.96.2.2ty=u
Index: php-src/ext/standard/dl.c
diff -u php-src/ext/standard/dl.c:1.96.2.1 php-src/ext/standard/dl.c:1.96.2.2
--- php-src/ext/standard/dl.c:1.96.2.1  Tue Jul 20 15:25:18 2004
+++ php-src/ext/standard/dl.c   Mon Mar 21 03:34:37 2005
@@ -18,7 +18,7 @@
+--+
 */
 
-/* $Id: dl.c,v 1.96.2.1 2004/07/20 19:25:18 helly Exp $ */
+/* $Id: dl.c,v 1.96.2.2 2005/03/21 08:34:37 hyanantha Exp $ */
 
 #include php.h
 #include dl.h
@@ -39,13 +39,6 @@
 #include win32/param.h
 #include win32/winutil.h
 #define GET_DL_ERROR() php_win_err()
-#elif defined(NETWARE)
-#ifdef NEW_LIBC
-#include sys/param.h
-#else
-#include netware/param.h
-#endif
-#define GET_DL_ERROR() dlerror()
 #else
 #include sys/param.h
 #define GET_DL_ERROR() DL_ERROR()

-- 
PHP CVS Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



[PHP-CVS] cvs: php-src(PHP_5_0) /ext/standard file.c

2005-03-21 Thread Anantha Kesari H Y
hyanantha   Mon Mar 21 03:40:55 2005 EDT

  Modified files:  (Branch: PHP_5_0)
/php-src/ext/standard   file.c 
  Log:
  NetWare LibC headers have sys/param.h
  
  
http://cvs.php.net/diff.php/php-src/ext/standard/file.c?r1=1.382.2.6r2=1.382.2.7ty=u
Index: php-src/ext/standard/file.c
diff -u php-src/ext/standard/file.c:1.382.2.6 
php-src/ext/standard/file.c:1.382.2.7
--- php-src/ext/standard/file.c:1.382.2.6   Fri Mar 11 06:16:19 2005
+++ php-src/ext/standard/file.c Mon Mar 21 03:40:54 2005
@@ -21,7 +21,7 @@
+--+
  */
 
-/* $Id: file.c,v 1.382.2.6 2005/03/11 11:16:19 hyanantha Exp $ */
+/* $Id: file.c,v 1.382.2.7 2005/03/21 08:40:54 hyanantha Exp $ */
 
 /* Synced with php 3.0 revision 1.218 1999-06-16 [ssb] */
 
@@ -47,10 +47,6 @@
 #define O_RDONLY _O_RDONLY
 #include win32/param.h
 #include win32/winutil.h
-#elif defined(NETWARE)  !defined(NEW_LIBC)
-/*#include ws2nlm.h*/
-#include sys/socket.h
-#include netware/param.h
 #else
 #if HAVE_SYS_PARAM_H
 #include sys/param.h

-- 
PHP CVS Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



[PHP-CVS] cvs: php-src(PHP_5_0) /ext/standard ftp_fopen_wrapper.c

2005-03-21 Thread Anantha Kesari H Y
hyanantha   Mon Mar 21 03:42:34 2005 EDT

  Modified files:  (Branch: PHP_5_0)
/php-src/ext/standard   ftp_fopen_wrapper.c 
  Log:
  NetWare LibC headers have sys/param.h
  
  
http://cvs.php.net/diff.php/php-src/ext/standard/ftp_fopen_wrapper.c?r1=1.74.2.3r2=1.74.2.4ty=u
Index: php-src/ext/standard/ftp_fopen_wrapper.c
diff -u php-src/ext/standard/ftp_fopen_wrapper.c:1.74.2.3 
php-src/ext/standard/ftp_fopen_wrapper.c:1.74.2.4
--- php-src/ext/standard/ftp_fopen_wrapper.c:1.74.2.3   Thu Mar 10 08:37:54 2005
+++ php-src/ext/standard/ftp_fopen_wrapper.cMon Mar 21 03:42:34 2005
@@ -18,7 +18,7 @@
|  Sara Golemon [EMAIL PROTECTED]  |
+--+
  */
-/* $Id: ftp_fopen_wrapper.c,v 1.74.2.3 2005/03/10 13:37:54 hyanantha Exp $ */
+/* $Id: ftp_fopen_wrapper.c,v 1.74.2.4 2005/03/21 08:42:34 hyanantha Exp $ */
 
 #include php.h
 #include php_globals.h
@@ -35,14 +35,6 @@
 #include winsock2.h
 #define O_RDONLY _O_RDONLY
 #include win32/param.h
-#elif defined(NETWARE)
-/*#include ws2nlm.h*/
-/*#include sys/socket.h*/
-#ifdef NEW_LIBC
-#include sys/param.h
-#else
-#include netware/param.h
-#endif
 #else
 #include sys/param.h
 #endif

-- 
PHP CVS Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



[PHP-CVS] cvs: php-src(PHP_5_0) /ext/standard html.c

2005-03-21 Thread Anantha Kesari H Y
hyanantha   Mon Mar 21 03:43:57 2005 EDT

  Modified files:  (Branch: PHP_5_0)
/php-src/ext/standard   html.c 
  Log:
  NetWare can make use of configure generated php_config.h
  
  
http://cvs.php.net/diff.php/php-src/ext/standard/html.c?r1=1.97.2.7r2=1.97.2.8ty=u
Index: php-src/ext/standard/html.c
diff -u php-src/ext/standard/html.c:1.97.2.7 
php-src/ext/standard/html.c:1.97.2.8
--- php-src/ext/standard/html.c:1.97.2.7Thu Mar 10 06:40:03 2005
+++ php-src/ext/standard/html.c Mon Mar 21 03:43:57 2005
@@ -18,7 +18,7 @@
+--+
 */
 
-/* $Id: html.c,v 1.97.2.7 2005/03/10 11:40:03 jorton Exp $ */
+/* $Id: html.c,v 1.97.2.8 2005/03/21 08:43:57 hyanantha Exp $ */
 
 /*
  * HTML entity resources:
@@ -34,8 +34,6 @@
 #include php.h
 #if PHP_WIN32
 #include config.w32.h
-#elif defined NETWARE
-#include config.nw.h
 #else
 #include php_config.h
 #endif

-- 
PHP CVS Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



[PHP-CVS] cvs: php-src(PHP_5_0) /ext/standard http_fopen_wrapper.c

2005-03-21 Thread Anantha Kesari H Y
hyanantha   Mon Mar 21 03:46:50 2005 EDT

  Modified files:  (Branch: PHP_5_0)
/php-src/ext/standard   http_fopen_wrapper.c 
  Log:
  NetWare LibC headers have sys/param.h
  
  
http://cvs.php.net/diff.php/php-src/ext/standard/http_fopen_wrapper.c?r1=1.88r2=1.88.2.1ty=u
Index: php-src/ext/standard/http_fopen_wrapper.c
diff -u php-src/ext/standard/http_fopen_wrapper.c:1.88 
php-src/ext/standard/http_fopen_wrapper.c:1.88.2.1
--- php-src/ext/standard/http_fopen_wrapper.c:1.88  Fri May 28 09:38:06 2004
+++ php-src/ext/standard/http_fopen_wrapper.c   Mon Mar 21 03:46:50 2005
@@ -18,7 +18,7 @@
|  Wez Furlong [EMAIL PROTECTED]  |
+--+
  */
-/* $Id: http_fopen_wrapper.c,v 1.88 2004/05/28 13:38:06 sesser Exp $ */ 
+/* $Id: http_fopen_wrapper.c,v 1.88.2.1 2005/03/21 08:46:50 hyanantha Exp $ */ 
 
 #include php.h
 #include php_globals.h
@@ -37,14 +37,6 @@
 #ifdef PHP_WIN32
 #define O_RDONLY _O_RDONLY
 #include win32/param.h
-#elif defined(NETWARE)
-/*#include ws2nlm.h*/
-/*#include sys/socket.h*/
-#ifdef NEW_LIBC
-#include sys/param.h
-#else
-#include netware/param.h
-#endif
 #else
 #include sys/param.h
 #endif

-- 
PHP CVS Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP-CVS] cvs: php-src(PHP_5_0) /ext/standard http_fopen_wrapper.c

2005-03-21 Thread Derick Rethans
In-Reply-To: [EMAIL PROTECTED]
Message-ID: [EMAIL PROTECTED]
References: [EMAIL PROTECTED]
MIME-Version: 1.0
Content-Type: TEXT/PLAIN; charset=US-ASCII
X-Virus-Scanned: by amavisd-new at jdimedia.nl
X-Amavis-Alert: BAD HEADER Improper folded header field made up entirely of 
whitespace in message header 'Subject':   

On Mon, 21 Mar 2005, Anantha Kesari H Y wrote:

 hyanantha Mon Mar 21 03:46:50 2005 EDT
 
   Modified files:  (Branch: PHP_5_0)
 /php-src/ext/standard http_fopen_wrapper.c 
   Log:
   NetWare LibC headers have sys/param.h

Perhaps it's a good idea to commit more than one file at a time? That 
makes less noise on the CVS list and makes it also easier to figure out 
which commits belong to each other.

regards,
Derick

-- 
Derick Rethans
http://derickrethans.nl | http://ez.no | http://xdebug.org

-- 
PHP CVS Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP-CVS] cvs: php-src(PHP_5_0) /ext/standard http_fopen_wrapper.c

2005-03-21 Thread Christopher Kings-Lynne
hyanantha   Mon Mar 21 03:46:50 2005 EDT
 Modified files:  (Branch: PHP_5_0)
   /php-src/ext/standard	http_fopen_wrapper.c 
 Log:
 NetWare LibC headers have sys/param.h

Perhaps it's a good idea to commit more than one file at a time? That 
makes less noise on the CVS list and makes it also easier to figure out 
which commits belong to each other.
Also shouldn't these be committed to HEAD as well?
--
PHP CVS Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


[PHP-CVS] cvs: php-src(PHP_5_0) /ext/standard pack.c

2005-03-21 Thread Anantha Kesari H Y
hyanantha   Mon Mar 21 03:55:45 2005 EDT

  Modified files:  (Branch: PHP_5_0)
/php-src/ext/standard   pack.c 
  Log:
  NetWare LibC headers have sys/param.h
  
  
http://cvs.php.net/diff.php/php-src/ext/standard/pack.c?r1=1.52.2.2r2=1.52.2.3ty=u
Index: php-src/ext/standard/pack.c
diff -u php-src/ext/standard/pack.c:1.52.2.2 
php-src/ext/standard/pack.c:1.52.2.3
--- php-src/ext/standard/pack.c:1.52.2.2Thu Mar 10 07:23:12 2005
+++ php-src/ext/standard/pack.c Mon Mar 21 03:55:43 2005
@@ -15,7 +15,7 @@
| Author: Chris Schneider [EMAIL PROTECTED]  |
+--+
  */
-/* $Id: pack.c,v 1.52.2.2 2005/03/10 12:23:12 hyanantha Exp $ */
+/* $Id: pack.c,v 1.52.2.3 2005/03/21 08:55:43 hyanantha Exp $ */
 
 #include php.h
 
@@ -30,17 +30,12 @@
 #include win32/param.h
 #elif defined(NETWARE)
 #ifdef USE_WINSOCK
-/*#include ws2nlm.h*/
 #include novsock2.h
 #else
 #include sys/socket.h
 #endif
-#ifdef NEW_LIBC
 #include sys/param.h
 #else
-#include netware/param.h
-#endif
-#else
 #include sys/param.h
 #endif
 #include ext/standard/head.h

-- 
PHP CVS Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP-CVS] cvs: php-src(PHP_5_0) /ext/standard http_fopen_wrapper.c

2005-03-21 Thread Derick Rethans
On Mon, 21 Mar 2005, Christopher Kings-Lynne wrote:

  hyanantha  Mon Mar 21 03:46:50 2005 EDT
  
Modified files:  (Branch: PHP_5_0)
 /php-src/ext/standard   http_fopen_wrapper.c Log:
NetWare LibC headers have sys/param.h
  
  
  Perhaps it's a good idea to commit more than one file at a time? That makes
  less noise on the CVS list and makes it also easier to figure out which
  commits belong to each other.
 
 Also shouldn't these be committed to HEAD as well?

Yes indeed.

Derick

-- 
Derick Rethans
http://derickrethans.nl | http://ez.no | http://xdebug.org

-- 
PHP CVS Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



[PHP-CVS] cvs: php-src /ext/soap php_sdl.c php_sdl.h /ext/soap/tests/bugs bug30928.wsdl /ext/soap/tests/schema test_schema.inc

2005-03-21 Thread Dmitry Stogov
dmitry  Mon Mar 21 10:52:54 2005 EDT

  Modified files:  
/php-src/ext/soap   php_sdl.c php_sdl.h 
/php-src/ext/soap/tests/bugsbug30928.wsdl 
/php-src/ext/soap/tests/schema  test_schema.inc 
  Log:
  Support for soap:body parts attribute
  
  
http://cvs.php.net/diff.php/php-src/ext/soap/php_sdl.c?r1=1.79r2=1.80ty=u
Index: php-src/ext/soap/php_sdl.c
diff -u php-src/ext/soap/php_sdl.c:1.79 php-src/ext/soap/php_sdl.c:1.80
--- php-src/ext/soap/php_sdl.c:1.79 Thu Mar 17 03:15:23 2005
+++ php-src/ext/soap/php_sdl.c  Mon Mar 21 10:52:50 2005
@@ -17,7 +17,7 @@
   |  Dmitry Stogov [EMAIL PROTECTED] |
   +--+
 */
-/* $Id: php_sdl.c,v 1.79 2005/03/17 08:15:23 sniper Exp $ */
+/* $Id: php_sdl.c,v 1.80 2005/03/21 15:52:50 dmitry Exp $ */
 
 #include php_soap.h
 #include ext/libxml/php_libxml.h
@@ -480,8 +480,43 @@
 
tmp = get_attribute(body-properties, parts);
if (tmp) {
-   whiteSpace_collapse(tmp-children-content);
-   binding-parts = 
estrdup(tmp-children-content);
+   HashTableht;
+   char *parts = tmp-children-content;
+
+   /* Delete all parts those are not in the 
parts attribute */
+   zend_hash_init(ht, 0, NULL, delete_parameter, 
0);
+   while (*parts) {
+   HashPosition pos;
+   sdlParamPtr *param;
+   int found = 0;
+   char *end;
+
+   while (*parts == ' ') ++parts;
+   if (*parts == '\0') break;
+   end = strchr(parts, ' ');
+   if (end) *end = '\0';
+   
zend_hash_internal_pointer_reset_ex(params, pos);
+   while 
(zend_hash_get_current_data_ex(params, (void **)param, pos) != FAILURE) {
+   if ((*param)-paramName 
+   strcmp(parts, 
(*param)-paramName) == 0) {
+   sdlParamPtr x_param;
+   x_param = 
emalloc(sizeof(sdlParam));
+   *x_param = **param;
+   (*param)-paramName = NULL;
+   
zend_hash_next_index_insert(ht, x_param, sizeof(sdlParamPtr), NULL);
+   found = 1;
+   break;
+   }
+   
zend_hash_move_forward_ex(params, pos);
+   }
+   if (!found) {
+   soap_error1(E_ERROR, Parsing 
WSDL: Missing part '%s' in message, parts);
+   }
+   parts += strlen(parts);
+   if (end) *end = ' ';
+   }
+   zend_hash_destroy(params);
+   *params = ht;
}
 
if (binding-use == SOAP_ENCODED) {
@@ -1026,7 +1061,7 @@
return ctx.sdl;
 }
 
-#define WSDL_CACHE_VERSION 0x0a
+#define WSDL_CACHE_VERSION 0x0b
 
 #define WSDL_CACHE_GET(ret,type,buf)   memcpy(ret,*buf,sizeof(type)); *buf += 
sizeof(type);
 #define WSDL_CACHE_GET_INT(ret,buf)ret = ((unsigned 
char)(*buf)[0])|((unsigned char)(*buf)[1]8)|((unsigned 
char)(*buf)[2]16)|((int)(*buf)[3]24); *buf += 4;
@@ -1274,7 +1309,6 @@
body-encodingStyle = SOAP_ENCODING_DEFAULT;
}
body-ns = sdl_deserialize_string(in);
-   body-parts = sdl_deserialize_string(in);
WSDL_CACHE_GET_INT(i, in);
if (i  0) {
body-headers = emalloc(sizeof(HashTable));
@@ -1875,7 +1909,6 @@
WSDL_CACHE_PUT_1(body-encodingStyle, out);
}
sdl_serialize_string(body-ns, out);
-   sdl_serialize_string(body-parts, out);
if (body-headers) {
i = zend_hash_num_elements(body-headers);
} else {
@@ -2310,9 +2343,6 @@
if (body.ns) {
efree(body.ns);
}
-   if (body.parts) {
-   efree(body.parts);
-   }
if (body.headers) {
zend_hash_destroy(body.headers);
efree(body.headers);

[PHP-CVS] cvs: php-src(PHP_5_0) /ext/soap/tests/bugs bug30928.wsdl /ext/soap/tests/schema test_schema.inc

2005-03-21 Thread Dmitry Stogov
dmitry  Mon Mar 21 10:53:32 2005 EDT

  Modified files:  (Branch: PHP_5_0)
/php-src/ext/soap/tests/bugsbug30928.wsdl 
/php-src/ext/soap/tests/schema  test_schema.inc 
  Log:
  Fixed wrong WSDL in test files
  
  
http://cvs.php.net/diff.php/php-src/ext/soap/tests/bugs/bug30928.wsdl?r1=1.1.2.1r2=1.1.2.2ty=u
Index: php-src/ext/soap/tests/bugs/bug30928.wsdl
diff -u php-src/ext/soap/tests/bugs/bug30928.wsdl:1.1.2.1 
php-src/ext/soap/tests/bugs/bug30928.wsdl:1.1.2.2
--- php-src/ext/soap/tests/bugs/bug30928.wsdl:1.1.2.1   Tue Dec  7 12:29:24 2004
+++ php-src/ext/soap/tests/bugs/bug30928.wsdl   Mon Mar 21 10:53:32 2005
@@ -34,10 +34,10 @@
operation name=test
soap:operation soapAction=#test style=rpc/
input
-   soap:body parts=body use=encoded 
namespace=http://test-uri/; 
encodingStyle=http://schemas.xmlsoap.org/soap/encoding//
+   soap:body use=encoded 
namespace=http://test-uri/; 
encodingStyle=http://schemas.xmlsoap.org/soap/encoding//
/input
output
-   soap:body parts=body use=encoded 
namespace=http://test-uri/; 
encodingStyle=http://schemas.xmlsoap.org/soap/encoding//
+   soap:body use=encoded 
namespace=http://test-uri/; 
encodingStyle=http://schemas.xmlsoap.org/soap/encoding//
/output
/operation
/binding
http://cvs.php.net/diff.php/php-src/ext/soap/tests/schema/test_schema.inc?r1=1.6.2.1r2=1.6.2.2ty=u
Index: php-src/ext/soap/tests/schema/test_schema.inc
diff -u php-src/ext/soap/tests/schema/test_schema.inc:1.6.2.1 
php-src/ext/soap/tests/schema/test_schema.inc:1.6.2.2
--- php-src/ext/soap/tests/schema/test_schema.inc:1.6.2.1   Thu Jan 20 
07:40:15 2005
+++ php-src/ext/soap/tests/schema/test_schema.inc   Mon Mar 21 10:53:32 2005
@@ -37,7 +37,7 @@
operation name=test
soap:operation soapAction=#test style=$style/
input
-   soap:body parts=body use=$use 
namespace=http://test-uri/; 
encodingStyle=http://schemas.xmlsoap.org/soap/encoding//
+   soap:body use=$use 
namespace=http://test-uri/; 
encodingStyle=http://schemas.xmlsoap.org/soap/encoding//
/input
/operation
/binding

-- 
PHP CVS Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



[PHP-CVS] cvs: php-src(PHP_5_0) /ext/soap php_sdl.c php_sdl.h

2005-03-21 Thread Dmitry Stogov
dmitry  Mon Mar 21 10:57:17 2005 EDT

  Modified files:  (Branch: PHP_5_0)
/php-src/ext/soap   php_sdl.c php_sdl.h 
  Log:
  Support for soap:body parts attribute.
  
  
http://cvs.php.net/diff.php/php-src/ext/soap/php_sdl.c?r1=1.70.2.6r2=1.70.2.7ty=u
Index: php-src/ext/soap/php_sdl.c
diff -u php-src/ext/soap/php_sdl.c:1.70.2.6 php-src/ext/soap/php_sdl.c:1.70.2.7
--- php-src/ext/soap/php_sdl.c:1.70.2.6 Mon Jan 31 10:08:36 2005
+++ php-src/ext/soap/php_sdl.c  Mon Mar 21 10:57:16 2005
@@ -17,7 +17,7 @@
   |  Dmitry Stogov [EMAIL PROTECTED] |
   +--+
 */
-/* $Id: php_sdl.c,v 1.70.2.6 2005/01/31 15:08:36 dmitry Exp $ */
+/* $Id: php_sdl.c,v 1.70.2.7 2005/03/21 15:57:16 dmitry Exp $ */
 
 #include php_soap.h
 #include ext/libxml/php_libxml.h
@@ -76,7 +76,6 @@
 static sdlTypePtr get_element(sdlPtr sdl, xmlNodePtr node, const char *type)
 {
sdlTypePtr ret = NULL;
-   TSRMLS_FETCH();
 
if (sdl-elements) {
xmlNsPtr nsptr;
@@ -481,8 +480,43 @@
 
tmp = get_attribute(body-properties, parts);
if (tmp) {
-   whiteSpace_collapse(tmp-children-content);
-   binding-parts = 
estrdup(tmp-children-content);
+   HashTableht;
+   char *parts = tmp-children-content;
+
+   /* Delete all parts those are not in the 
parts attribute */
+   zend_hash_init(ht, 0, NULL, delete_parameter, 
0);
+   while (*parts) {
+   HashPosition pos;
+   sdlParamPtr *param;
+   int found = 0;
+   char *end;
+
+   while (*parts == ' ') ++parts;
+   if (*parts == '\0') break;
+   end = strchr(parts, ' ');
+   if (end) *end = '\0';
+   
zend_hash_internal_pointer_reset_ex(params, pos);
+   while 
(zend_hash_get_current_data_ex(params, (void **)param, pos) != FAILURE) {
+   if ((*param)-paramName 
+   strcmp(parts, 
(*param)-paramName) == 0) {
+   sdlParamPtr x_param;
+   x_param = 
emalloc(sizeof(sdlParam));
+   *x_param = **param;
+   (*param)-paramName = NULL;
+   
zend_hash_next_index_insert(ht, x_param, sizeof(sdlParamPtr), NULL);
+   found = 1;
+   break;
+   }
+   
zend_hash_move_forward_ex(params, pos);
+   }
+   if (!found) {
+   soap_error1(E_ERROR, Parsing 
WSDL: Missing part '%s' in message, parts);
+   }
+   parts += strlen(parts);
+   if (end) *end = ' ';
+   }
+   zend_hash_destroy(params);
+   *params = ht;
}
 
if (binding-use == SOAP_ENCODED) {
@@ -1027,7 +1061,7 @@
return ctx.sdl;
 }
 
-#define WSDL_CACHE_VERSION 0x0a
+#define WSDL_CACHE_VERSION 0x0b
 
 #define WSDL_CACHE_GET(ret,type,buf)   memcpy(ret,*buf,sizeof(type)); *buf += 
sizeof(type);
 #define WSDL_CACHE_GET_INT(ret,buf)ret = ((unsigned 
char)(*buf)[0])|((unsigned char)(*buf)[1]8)|((unsigned 
char)(*buf)[2]16)|((int)(*buf)[3]24); *buf += 4;
@@ -1275,7 +1309,6 @@
body-encodingStyle = SOAP_ENCODING_DEFAULT;
}
body-ns = sdl_deserialize_string(in);
-   body-parts = sdl_deserialize_string(in);
WSDL_CACHE_GET_INT(i, in);
if (i  0) {
body-headers = emalloc(sizeof(HashTable));
@@ -1876,7 +1909,6 @@
WSDL_CACHE_PUT_1(body-encodingStyle, out);
}
sdl_serialize_string(body-ns, out);
-   sdl_serialize_string(body-parts, out);
if (body-headers) {
i = zend_hash_num_elements(body-headers);
} else {
@@ -2311,9 +2343,6 @@
if (body.ns) {
efree(body.ns);
}
-   if (body.parts) {
-   efree(body.parts);
-   }
if 

[PHP-CVS] cvs: php-src /ext/spl spl_array.c /ext/spl/tests bug32394.phpt

2005-03-21 Thread Marcus Boerger
helly   Mon Mar 21 15:07:33 2005 EDT

  Added files: 
/php-src/ext/spl/tests  bug32394.phpt 

  Modified files:  
/php-src/ext/splspl_array.c 
  Log:
  - Fix Bug #32394 offsetUnset() segfaults in a foreach
  
  
http://cvs.php.net/diff.php/php-src/ext/spl/spl_array.c?r1=1.65r2=1.66ty=u
Index: php-src/ext/spl/spl_array.c
diff -u php-src/ext/spl/spl_array.c:1.65 php-src/ext/spl/spl_array.c:1.66
--- php-src/ext/spl/spl_array.c:1.65Sun Mar 13 11:35:01 2005
+++ php-src/ext/spl/spl_array.c Mon Mar 21 15:07:31 2005
@@ -16,7 +16,7 @@
+--+
  */
 
-/* $Id: spl_array.c,v 1.65 2005/03/13 16:35:01 helly Exp $ */
+/* $Id: spl_array.c,v 1.66 2005/03/21 20:07:31 helly Exp $ */
 
 #ifdef HAVE_CONFIG_H
 # include config.h
@@ -134,6 +134,27 @@
zend_function *   fptr_offset_del;
 } spl_array_object;
 
+SPL_API int spl_hash_verify_pos(spl_array_object * intern TSRMLS_DC) /* {{{ */
+{
+   HashTable *ht = HASH_OF(intern-array);
+   Bucket *p;
+
+/* IS_CONSISTENT(ht);*/
+
+/* HASH_PROTECT_RECURSION(ht);*/
+   p = ht-pListHead;
+   while (p != NULL) {
+   if (p == intern-pos) {
+   return SUCCESS;
+   }
+   p = p-pListNext;
+   }
+/* HASH_UNPROTECT_RECURSION(ht); */
+   zend_hash_internal_pointer_reset_ex(HASH_OF(intern-array), 
intern-pos);
+   return FAILURE;
+}
+/* }}} */
+
 /* {{{ spl_array_object_free_storage */
 static void spl_array_object_free_storage(void *object TSRMLS_DC)
 {
@@ -352,7 +373,7 @@
zend_error(E_NOTICE,Undefined index:  %s, 
Z_STRVAL_P(offset));
}
}
-   return;
+   break;
case IS_DOUBLE:
case IS_RESOURCE:
case IS_BOOL: 
@@ -365,11 +386,12 @@
if (zend_hash_index_del(HASH_OF(intern-array), index) == 
FAILURE) {
zend_error(E_NOTICE,Undefined offset:  %ld, 
Z_LVAL_P(offset));
}
-   return;
+   break;
default:
zend_error(E_WARNING, Illegal offset type);
return;
}
+   spl_hash_verify_pos(intern TSRMLS_CC); /* call rewind on FAILURE */
 } /* }}} */
 
 static void spl_array_unset_dimension(zval *object, zval *offset TSRMLS_DC) /* 
{{{ */
@@ -521,27 +543,6 @@
 }
 /* }}} */
 
-SPL_API int spl_hash_verify_pos(spl_array_object * intern TSRMLS_DC) /* {{{ */
-{
-   HashTable *ht = HASH_OF(intern-array);
-   Bucket *p;
-
-/* IS_CONSISTENT(ht);*/
-
-/* HASH_PROTECT_RECURSION(ht);*/
-   p = ht-pListHead;
-   while (p != NULL) {
-   if (p == intern-pos) {
-   return SUCCESS;
-   }
-   p = p-pListNext;
-   }
-/* HASH_UNPROTECT_RECURSION(ht); */
-   zend_hash_internal_pointer_reset_ex(HASH_OF(intern-array), 
intern-pos);
-   return FAILURE;
-}
-/* }}} */
-
 static int spl_array_skip_protected(spl_array_object *intern TSRMLS_DC) /* {{{ 
*/
 {
char *string_key;
@@ -673,19 +674,26 @@
 }
 /* }}} */
 
-static void spl_array_it_rewind(zend_object_iterator *iter TSRMLS_DC) /* {{{ */
+static void spl_array_rewind(spl_array_object *intern TSRMLS_DC) /* {{{ */
 {
-   spl_array_it   *iterator = (spl_array_it *)iter;
-   spl_array_object   *object   = iterator-object;
-   HashTable  *aht  = HASH_OF(object-array);
+   HashTable  *aht  = HASH_OF(intern-array);
 
if (!aht) {
php_error_docref(NULL TSRMLS_CC, E_NOTICE, 
ArrayIterator::rewind(): Array was modified outside object and is no longer an 
array);
return;
}
 
-   zend_hash_internal_pointer_reset_ex(aht, object-pos);
-   spl_array_skip_protected(object TSRMLS_CC);
+   zend_hash_internal_pointer_reset_ex(aht, intern-pos);
+   spl_array_skip_protected(intern TSRMLS_CC);
+}
+/* }}} */
+
+static void spl_array_it_rewind(zend_object_iterator *iter TSRMLS_DC) /* {{{ */
+{
+   spl_array_it   *iterator = (spl_array_it *)iter;
+   spl_array_object   *object   = iterator-object;
+
+   spl_array_rewind(object TSRMLS_CC);
 }
 /* }}} */
 
@@ -782,15 +790,8 @@
 {
zval *object = getThis();
spl_array_object *intern = 
(spl_array_object*)zend_object_store_get_object(object TSRMLS_CC);
-   HashTable *aht = HASH_OF(intern-array);
-
-   if (!aht) {
-   php_error_docref(NULL TSRMLS_CC, E_NOTICE, Array was modified 
outside object and is no longer an array);
-   return;
-   }
 
-   zend_hash_internal_pointer_reset_ex(aht, intern-pos);
-   spl_array_skip_protected(intern TSRMLS_CC);
+   spl_array_rewind(intern TSRMLS_CC);
 }
 /* }}} */
 

http://cvs.php.net/co.php/php-src/ext/spl/tests/bug32394.phpt?r=1.1p=1
Index: 

[PHP-CVS] cvs: php-src(PHP_5_0) / NEWS /ext/spl spl_array.c /ext/spl/tests bug32394.phpt

2005-03-21 Thread Marcus Boerger
helly   Mon Mar 21 15:13:54 2005 EDT

  Added files: (Branch: PHP_5_0)
/php-src/ext/spl/tests  bug32394.phpt 

  Modified files:  
/php-srcNEWS 
/php-src/ext/splspl_array.c 
  Log:
  - Fixed bug #32394 offsetUnset() segfaults in a foreach
  
http://cvs.php.net/diff.php/php-src/NEWS?r1=1.1760.2.294r2=1.1760.2.295ty=u
Index: php-src/NEWS
diff -u php-src/NEWS:1.1760.2.294 php-src/NEWS:1.1760.2.295
--- php-src/NEWS:1.1760.2.294   Sat Mar 19 09:30:03 2005
+++ php-src/NEWSMon Mar 21 15:13:52 2005
@@ -30,6 +30,7 @@
   is passed. (Tony)
 - Fixed posix_getsid()  posix_getpgid() to return sid  pgid instead 
   of true. (Tony)   
+- Fixed bug #32394 (offsetUnset() segfaults in a foreach). (Marcus)
 - Fixed bug #32373 (segfault in bzopen() if supplied path to non-existent 
   file). (Tony)
 - Fixed bug #32326 (Check values of Connection/Transfer-Encoding 
http://cvs.php.net/diff.php/php-src/ext/spl/spl_array.c?r1=1.49.2.6r2=1.49.2.7ty=u
Index: php-src/ext/spl/spl_array.c
diff -u php-src/ext/spl/spl_array.c:1.49.2.6 
php-src/ext/spl/spl_array.c:1.49.2.7
--- php-src/ext/spl/spl_array.c:1.49.2.6Tue Mar  8 16:37:51 2005
+++ php-src/ext/spl/spl_array.c Mon Mar 21 15:13:54 2005
@@ -16,7 +16,7 @@
+--+
  */
 
-/* $Id: spl_array.c,v 1.49.2.6 2005/03/08 21:37:51 johannes Exp $ */
+/* $Id: spl_array.c,v 1.49.2.7 2005/03/21 20:13:54 helly Exp $ */
 
 #ifdef HAVE_CONFIG_H
 # include config.h
@@ -56,12 +56,12 @@
 ZEND_END_ARG_INFO();
 
 static
-ZEND_BEGIN_ARG_INFO(arginfo_array_offsetGet, 0)
+ZEND_BEGIN_ARG_INFO_EX(arginfo_array_offsetGet, 0, 0, 1)
ZEND_ARG_INFO(0, index)
 ZEND_END_ARG_INFO();
 
 static
-ZEND_BEGIN_ARG_INFO(arginfo_array_offsetSet, 0)
+ZEND_BEGIN_ARG_INFO_EX(arginfo_array_offsetSet, 0, 0, 2)
ZEND_ARG_INFO(0, index)
ZEND_ARG_INFO(0, newval)
 ZEND_END_ARG_INFO();
@@ -127,6 +127,27 @@
zend_function *   fptr_offset_del;
 } spl_array_object;
 
+SPL_API int spl_hash_verify_pos(spl_array_object * intern TSRMLS_DC) /* {{{ */
+{
+   HashTable *ht = HASH_OF(intern-array);
+   Bucket *p;
+
+/* IS_CONSISTENT(ht);*/
+
+/* HASH_PROTECT_RECURSION(ht);*/
+   p = ht-pListHead;
+   while (p != NULL) {
+   if (p == intern-pos) {
+   return SUCCESS;
+   }
+   p = p-pListNext;
+   }
+/* HASH_UNPROTECT_RECURSION(ht); */
+   zend_hash_internal_pointer_reset_ex(HASH_OF(intern-array), 
intern-pos);
+   return FAILURE;
+}
+/* }}} */
+
 /* {{{ spl_array_object_free_storage */
 static void spl_array_object_free_storage(void *object TSRMLS_DC)
 {
@@ -344,8 +365,7 @@
if (zend_symtable_del(HASH_OF(intern-array), 
Z_STRVAL_P(offset), Z_STRLEN_P(offset)+1) == FAILURE) {
zend_error(E_NOTICE,Undefined index:  %s, 
Z_STRVAL_P(offset));
}
-
-   return;
+   break;
case IS_DOUBLE:
case IS_RESOURCE:
case IS_BOOL: 
@@ -358,11 +378,12 @@
if (zend_hash_index_del(HASH_OF(intern-array), index) == 
FAILURE) {
zend_error(E_NOTICE,Undefined offset:  %ld, 
Z_LVAL_P(offset));
}
-   return;
+   break;
default:
zend_error(E_WARNING, Illegal offset type);
return;
}
+   spl_hash_verify_pos(intern TSRMLS_CC); /* call rewind on FAILURE */
 } /* }}} */
 
 static void spl_array_unset_dimension(zval *object, zval *offset TSRMLS_DC) /* 
{{{ */
@@ -514,27 +535,6 @@
 }
 /* }}} */
 
-SPL_API int spl_hash_verify_pos(spl_array_object * intern TSRMLS_DC) /* {{{ */
-{
-   HashTable *ht = HASH_OF(intern-array);
-   Bucket *p;
-
-/* IS_CONSISTENT(ht);*/
-
-/* HASH_PROTECT_RECURSION(ht);*/
-   p = ht-pListHead;
-   while (p != NULL) {
-   if (p == intern-pos) {
-   return SUCCESS;
-   }
-   p = p-pListNext;
-   }
-/* HASH_UNPROTECT_RECURSION(ht); */
-   zend_hash_internal_pointer_reset_ex(HASH_OF(intern-array), 
intern-pos);
-   return FAILURE;
-}
-/* }}} */
-
 static int spl_array_skip_protected(spl_array_object *intern TSRMLS_DC) /* {{{ 
*/
 {
char *string_key;
@@ -666,19 +666,26 @@
 }
 /* }}} */
 
-static void spl_array_it_rewind(zend_object_iterator *iter TSRMLS_DC) /* {{{ */
+static void spl_array_rewind(spl_array_object *intern TSRMLS_DC) /* {{{ */
 {
-   spl_array_it   *iterator = (spl_array_it *)iter;
-   spl_array_object   *object   = iterator-object;
-   HashTable  *aht  = HASH_OF(object-array);
+   HashTable  *aht  = HASH_OF(intern-array);
 
if (!aht) {
php_error_docref(NULL TSRMLS_CC, E_NOTICE, 
ArrayIterator::rewind(): Array was modified outside object and is no longer an 
array);

[PHP-CVS] cvs: php-src /ext/standard array.c

2005-03-21 Thread Ilia Alshanetsky
iliaa   Mon Mar 21 20:45:17 2005 EDT

  Modified files:  
/php-src/ext/standard   array.c 
  Log:
  Simplify argument checking code for array_combine().
  
  
http://cvs.php.net/diff.php/php-src/ext/standard/array.c?r1=1.295r2=1.296ty=u
Index: php-src/ext/standard/array.c
diff -u php-src/ext/standard/array.c:1.295 php-src/ext/standard/array.c:1.296
--- php-src/ext/standard/array.c:1.295  Sat Mar 19 09:24:17 2005
+++ php-src/ext/standard/array.cMon Mar 21 20:45:17 2005
@@ -21,7 +21,7 @@
+--+
 */
 
-/* $Id: array.c,v 1.295 2005/03/19 14:24:17 helly Exp $ */
+/* $Id: array.c,v 1.296 2005/03/22 01:45:17 iliaa Exp $ */
 
 #include php.h
 #include php_ini.h
@@ -4366,17 +4366,16 @@
return;
}
 
-   if (zend_hash_num_elements(Z_ARRVAL_P(keys)) == 0 || 
zend_hash_num_elements(Z_ARRVAL_P(values)) == 0) {
-   php_error_docref(NULL TSRMLS_CC, E_WARNING, Both parameters 
should have at least 1 element);
+   if (zend_hash_num_elements(Z_ARRVAL_P(keys)) != 
zend_hash_num_elements(Z_ARRVAL_P(values))) {
+   php_error_docref(NULL TSRMLS_CC, E_WARNING, Both parameters 
should have equal number of elements);
RETURN_FALSE;
}
 
-   
-   if (zend_hash_num_elements(Z_ARRVAL_P(keys)) != 
zend_hash_num_elements(Z_ARRVAL_P(values))) {
-   php_error_docref(NULL TSRMLS_CC, E_WARNING, Both parameters 
should have equal number of elements);
+   if (!zend_hash_num_elements(Z_ARRVAL_P(keys))) {
+   php_error_docref(NULL TSRMLS_CC, E_WARNING, Both parameters 
should have at least 1 element);
RETURN_FALSE;
}
-   
+
array_init(return_value);

zend_hash_internal_pointer_reset_ex(Z_ARRVAL_P(keys), pos_keys);

-- 
PHP CVS Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php