cvs: /php4/ext/wddx wddx.c /php4/ext/xml xml.c /php4/ext/zlib zlib.c
| From: | Zeev Suraski | Date: | Fri, 24 Sep 1999 14:14:47 +0000 |
| Subject: | cvs: /php4/ext/wddx wddx.c /php4/ext/xml xml.c /php4/ext/zlib zlib.c | ||
| Groups: | php.version4 | ||
| Request: | Send a blank email to php-version4+get-4859@lists.php.net to get a copy of this message | ||
zeev Fri Sep 24 10:14:47 1999 EDT
Modified files:
/php4/ext/wddx wddx.c
/php4/ext/xml xml.c
/php4/ext/zlib zlib.c
Log:
Compile fixes for WDDX, XML and Zlib (untested)
Index: php4/ext/wddx/wddx.c
diff -u php4/ext/wddx/wddx.c:1.11 php4/ext/wddx/wddx.c:1.12
--- php4/ext/wddx/wddx.c:1.11 Tue Sep 21 17:38:51 1999
+++ php4/ext/wddx/wddx.c Fri Sep 24 10:14:47 1999
@@ -27,7 +27,7 @@
+----------------------------------------------------------------------+
*/
-/* $Id: wddx.c,v 1.11 1999/09/21 21:38:51 andrey Exp $ */
+/* $Id: wddx.c,v 1.12 1999/09/24 14:14:47 zeev Exp $ */
#include "php.h"
#include "php_wddx.h"
@@ -823,7 +823,7 @@
WRONG_PARAM_COUNT;
}
- ZEND_FETCH_RESOURCE(packet, wddx_packet *, packet_id, -1, "WDDX packet ID", le_wddx);
+ ZEND_FETCH_RESOURCE(packet, wddx_packet *, &packet_id, -1, "WDDX packet ID",
le_wddx);
_php_wddx_add_chunk(packet, WDDX_STRUCT_E);
@@ -861,7 +861,7 @@
packet_id = args[0];
- packet = (wddx_packet *)zend_fetch_resource(packet_id, -1, "WDDX packet ID", le_wddx);
+ packet = (wddx_packet *)zend_fetch_resource(&packet_id, -1, "WDDX packet ID",
le_wddx);
if (!packet)
{
efree(args);
Index: php4/ext/xml/xml.c
diff -u php4/ext/xml/xml.c:1.17 php4/ext/xml/xml.c:1.18
--- php4/ext/xml/xml.c:1.17 Mon Sep 20 08:51:20 1999
+++ php4/ext/xml/xml.c Fri Sep 24 10:14:47 1999
@@ -16,7 +16,7 @@
+----------------------------------------------------------------------+
*/
-/* $Id: xml.c,v 1.17 1999/09/20 12:51:20 thies Exp $ */
+/* $Id: xml.c,v 1.18 1999/09/24 14:14:47 zeev Exp $ */
#define IS_EXT_MODULE
/* boldly assume that if PIC is defined, we are being compiled dynamically */
@@ -1045,7 +1045,7 @@
WRONG_PARAM_COUNT;
}
- ZEND_FETCH_RESOURCE(parser,xml_parser *, pind, -1, "XML Parser", le_xml_parser);
+ ZEND_FETCH_RESOURCE(parser,xml_parser *, &pind, -1, "XML Parser", le_xml_parser);
convert_to_string(shdl);
convert_to_string(ehdl);
@@ -1068,7 +1068,7 @@
WRONG_PARAM_COUNT;
}
- ZEND_FETCH_RESOURCE(parser,xml_parser *, pind, -1, "XML Parser", le_xml_parser);
+ ZEND_FETCH_RESOURCE(parser,xml_parser *, &pind, -1, "XML Parser", le_xml_parser);
convert_to_string(hdl);
@@ -1089,7 +1089,7 @@
WRONG_PARAM_COUNT;
}
- ZEND_FETCH_RESOURCE(parser,xml_parser *, pind, -1, "XML Parser", le_xml_parser);
+ ZEND_FETCH_RESOURCE(parser,xml_parser *, &pind, -1, "XML Parser", le_xml_parser);
convert_to_string(hdl);
@@ -1109,7 +1109,7 @@
if (ARG_COUNT(ht) != 2 || getParameters(ht, 2, &pind, &hdl) == FAILURE) {
WRONG_PARAM_COUNT;
}
- ZEND_FETCH_RESOURCE(parser,xml_parser *, pind, -1, "XML Parser", le_xml_parser);
+ ZEND_FETCH_RESOURCE(parser,xml_parser *, &pind, -1, "XML Parser", le_xml_parser);
convert_to_string(hdl);
@@ -1130,7 +1130,7 @@
WRONG_PARAM_COUNT;
}
- ZEND_FETCH_RESOURCE(parser,xml_parser *, pind, -1, "XML Parser", le_xml_parser);
+ ZEND_FETCH_RESOURCE(parser,xml_parser *, &pind, -1, "XML Parser", le_xml_parser);
convert_to_string(hdl);
@@ -1150,7 +1150,7 @@
if (ARG_COUNT(ht) != 2 || getParameters(ht, 2, &pind, &hdl) == FAILURE) {
WRONG_PARAM_COUNT;
}
- ZEND_FETCH_RESOURCE(parser,xml_parser *, pind, -1, "XML Parser", le_xml_parser);
+ ZEND_FETCH_RESOURCE(parser,xml_parser *, &pind, -1, "XML Parser", le_xml_parser);
convert_to_string(hdl);
@@ -1170,7 +1170,7 @@
if (ARG_COUNT(ht) != 2 || getParameters(ht, 2, &pind, &hdl) == FAILURE) {
WRONG_PARAM_COUNT;
}
- ZEND_FETCH_RESOURCE(parser,xml_parser *, pind, -1, "XML Parser", le_xml_parser);
+ ZEND_FETCH_RESOURCE(parser,xml_parser *, &pind, -1, "XML Parser", le_xml_parser);
convert_to_string(hdl);
@@ -1192,7 +1192,7 @@
if (argc < 2 || argc > 3 || getParameters(ht, argc, &pind, &data, &final) ==
FAILURE) {
WRONG_PARAM_COUNT;
}
- ZEND_FETCH_RESOURCE(parser,xml_parser *, pind, -1, "XML Parser", le_xml_parser);
+ ZEND_FETCH_RESOURCE(parser,xml_parser *, &pind, -1, "XML Parser", le_xml_parser);
convert_to_string(data);
@@ -1233,7 +1233,7 @@
RETURN_FALSE;
}
- ZEND_FETCH_RESOURCE(parser,xml_parser *, pind, -1, "XML Parser", le_xml_parser);
+ ZEND_FETCH_RESOURCE(parser,xml_parser *, &pind, -1, "XML Parser", le_xml_parser);
convert_to_string(data);
array_init(xdata);
@@ -1263,7 +1263,7 @@
if (ARG_COUNT(ht) != 1 || getParameters(ht, 1, &pind) == FAILURE) {
WRONG_PARAM_COUNT;
}
- ZEND_FETCH_RESOURCE(parser,xml_parser *, pind, -1, "XML Parser", le_xml_parser);
+ ZEND_FETCH_RESOURCE(parser,xml_parser *, &pind, -1, "XML Parser", le_xml_parser);
RETVAL_LONG((long)XML_GetErrorCode(parser->parser));
}
@@ -1297,7 +1297,7 @@
if (ARG_COUNT(ht) != 1 || getParameters(ht, 1, &pind) == FAILURE) {
WRONG_PARAM_COUNT;
}
- ZEND_FETCH_RESOURCE(parser,xml_parser *, pind, -1, "XML Parser", le_xml_parser);
+ ZEND_FETCH_RESOURCE(parser,xml_parser *, &pind, -1, "XML Parser", le_xml_parser);
RETVAL_LONG(XML_GetCurrentLineNumber(parser->parser));
}
@@ -1314,7 +1314,7 @@
if (ARG_COUNT(ht) != 1 || getParameters(ht, 1, &pind) == FAILURE) {
WRONG_PARAM_COUNT;
}
- ZEND_FETCH_RESOURCE(parser,xml_parser *, pind, -1, "XML Parser", le_xml_parser);
+ ZEND_FETCH_RESOURCE(parser,xml_parser *, &pind, -1, "XML Parser", le_xml_parser);
RETVAL_LONG(XML_GetCurrentColumnNumber(parser->parser));
}
@@ -1330,7 +1330,7 @@
if (ARG_COUNT(ht) != 1 || getParameters(ht, 1, &pind) == FAILURE) {
WRONG_PARAM_COUNT;
}
- ZEND_FETCH_RESOURCE(parser,xml_parser *, pind, -1, "XML Parser", le_xml_parser);
+ ZEND_FETCH_RESOURCE(parser,xml_parser *, &pind, -1, "XML Parser", le_xml_parser);
RETVAL_LONG(XML_GetCurrentByteIndex(parser->parser));
}
@@ -1347,7 +1347,7 @@
WRONG_PARAM_COUNT;
}
- ZEND_FETCH_RESOURCE(parser,xml_parser *, pind, -1, "XML Parser", le_xml_parser);
+ ZEND_FETCH_RESOURCE(parser,xml_parser *, &pind, -1, "XML Parser", le_xml_parser);
if (php3_list_delete(parser->index) == FAILURE) {
RETURN_FALSE;
@@ -1368,7 +1368,7 @@
if (ARG_COUNT(ht) != 3 || getParameters(ht, 3, &pind, &opt, &val) == FAILURE) {
WRONG_PARAM_COUNT;
}
- ZEND_FETCH_RESOURCE(parser,xml_parser *, pind, -1, "XML Parser", le_xml_parser);
+ ZEND_FETCH_RESOURCE(parser,xml_parser *, &pind, -1, "XML Parser", le_xml_parser);
convert_to_long(opt);
@@ -1415,7 +1415,7 @@
if (ARG_COUNT(ht) != 2 || getParameters(ht, 2, &pind, &opt) == FAILURE) {
WRONG_PARAM_COUNT;
}
- ZEND_FETCH_RESOURCE(parser,xml_parser *, pind, -1, "XML Parser", le_xml_parser);
+ ZEND_FETCH_RESOURCE(parser,xml_parser *, &pind, -1, "XML Parser", le_xml_parser);
convert_to_long(opt);
Index: php4/ext/zlib/zlib.c
diff -u php4/ext/zlib/zlib.c:1.20 php4/ext/zlib/zlib.c:1.21
--- php4/ext/zlib/zlib.c:1.20 Wed Sep 22 03:43:36 1999
+++ php4/ext/zlib/zlib.c Fri Sep 24 10:14:47 1999
@@ -16,7 +16,7 @@
| Stefan Röhrich <sr@linux.de> |
+----------------------------------------------------------------------+
*/
-/* $Id: zlib.c,v 1.20 1999/09/22 07:43:36 sr Exp $ */
+/* $Id: zlib.c,v 1.21 1999/09/24 14:14:47 zeev Exp $ */
#define IS_EXT_MODULE
#include "php.h"
@@ -385,7 +385,7 @@
if (ARG_COUNT(ht) != 1 || getParameters(ht, 1, &arg1) == FAILURE) {
WRONG_PARAM_COUNT;
}
- ZEND_FETCH_RESOURCE(zp, gzFile *, arg1, -1, "Zlib file", le_zp);
+ ZEND_FETCH_RESOURCE(zp, gzFile *, &arg1, -1, "Zlib file", le_zp);
zend_list_delete(arg1->value.lval);
RETURN_TRUE;
}
@@ -400,7 +400,7 @@
if (ARG_COUNT(ht) != 1 || getParameters(ht, 1, &arg1) == FAILURE) {
WRONG_PARAM_COUNT;
}
- ZEND_FETCH_RESOURCE(zp, gzFile *, arg1, -1, "Zlib file", le_zp);
+ ZEND_FETCH_RESOURCE(zp, gzFile *, &arg1, -1, "Zlib file", le_zp);
if ((gzeof(zp))) {
RETURN_TRUE;
@@ -425,7 +425,7 @@
convert_to_long(arg2);
len = arg2->value.lval;
- ZEND_FETCH_RESOURCE(zp, gzFile *, arg1, -1, "Zlib file", le_zp);
+ ZEND_FETCH_RESOURCE(zp, gzFile *, &arg1, -1, "Zlib file", le_zp);
buf = emalloc(sizeof(char) * (len + 1));
/* needed because recv doesnt put a null at the end*/
@@ -458,7 +458,7 @@
WRONG_PARAM_COUNT;
}
- ZEND_FETCH_RESOURCE(zp, gzFile *, arg1, -1, "Zlib file", le_zp);
+ ZEND_FETCH_RESOURCE(zp, gzFile *, &arg1, -1, "Zlib file", le_zp);
buf = emalloc(sizeof(char) * 2);
if ((c=gzgetc(zp)) == (-1)) {
@@ -508,7 +508,7 @@
len = bytes->value.lval;
- ZEND_FETCH_RESOURCE(zp, gzFile *, fd, -1, "Zlib file", le_zp);
+ ZEND_FETCH_RESOURCE(zp, gzFile *, &fd, -1, "Zlib file", le_zp);
buf = emalloc(sizeof(char) * (len + 1));
/*needed because recv doesnt set null char at end*/
@@ -555,7 +555,7 @@
/* NOTREACHED */
break;
}
- ZEND_FETCH_RESOURCE(zp, gzFile *, arg1, -1, "Zlib file", le_zp);
+ ZEND_FETCH_RESOURCE(zp, gzFile *, &arg1, -1, "Zlib file", le_zp);
/* strip slashes only if the length wasn't specified explicitly */
if (!arg3 && PG(magic_quotes_runtime)) {
@@ -581,7 +581,7 @@
WRONG_PARAM_COUNT;
}
- ZEND_FETCH_RESOURCE(zp, gzFile *, arg1, -1, "Zlib file", le_zp);
+ ZEND_FETCH_RESOURCE(zp, gzFile *, &arg1, -1, "Zlib file", le_zp);
gzrewind(zp);
RETURN_TRUE;
@@ -599,7 +599,7 @@
WRONG_PARAM_COUNT;
}
- ZEND_FETCH_RESOURCE(zp, gzFile *, arg1, -1, "Zlib file", le_zp);
+ ZEND_FETCH_RESOURCE(zp, gzFile *, &arg1, -1, "Zlib file", le_zp);
pos = gztell(zp);
RETURN_LONG(pos);
@@ -620,7 +620,7 @@
convert_to_long(arg2);
pos = arg2->value.lval;
- ZEND_FETCH_RESOURCE(zp, gzFile *, arg1, -1, "Zlib file", le_zp);
+ ZEND_FETCH_RESOURCE(zp, gzFile *, &arg1, -1, "Zlib file", le_zp);
ret = gzseek(zp,pos,SEEK_SET);
RETURN_LONG(ret);
@@ -693,7 +693,7 @@
WRONG_PARAM_COUNT;
}
- ZEND_FETCH_RESOURCE(zp, gzFile *, arg1, -1, "Zlib file", le_zp);
+ ZEND_FETCH_RESOURCE(zp, gzFile *, &arg1, -1, "Zlib file", le_zp);
size = 0;
while((b = gzread(zp, buf, sizeof(buf))) > 0) {
@@ -721,7 +721,7 @@
convert_to_long(arg2);
len = arg2->value.lval;
- ZEND_FETCH_RESOURCE(zp, gzFile *, arg1, -1, "Zlib file", le_zp);
+ ZEND_FETCH_RESOURCE(zp, gzFile *, &arg1, -1, "Zlib file", le_zp);
return_value->value.str.val = emalloc(sizeof(char) * (len + 1));
/* needed because recv doesnt put a null at the end*/