cvs: php4 /ext/satellite namedvalue_to_zval.c typecode.c
| From: | David Eriksson | Date: | Tue, 30 Jan 2001 06:43:36 +0000 |
| Subject: | cvs: php4 /ext/satellite namedvalue_to_zval.c typecode.c | ||
| Groups: | php.cvs | ||
| Request: | Send a blank email to php-cvs+get-3809@lists.php.net to get a copy of this message | ||
eriksson Mon Jan 29 22:43:36 2001 EDT
Modified files:
/php4/ext/satellite namedvalue_to_zval.c typecode.c
Log:
Applied patch from Oleg Sharoiko <os@rsu.ru> to fix bug in satellite_any_to_zval_sequence
Index: php4/ext/satellite/namedvalue_to_zval.c
diff -u php4/ext/satellite/namedvalue_to_zval.c:1.2 php4/ext/satellite/namedvalue_to_zval.c:1.3
--- php4/ext/satellite/namedvalue_to_zval.c:1.2 Fri Sep 1 15:29:00 2000
+++ php4/ext/satellite/namedvalue_to_zval.c Mon Jan 29 22:43:35 2001
@@ -17,7 +17,7 @@
*/
/*
- * $Id: namedvalue_to_zval.c,v 1.2 2000/09/01 22:29:00 eriksson Exp $
+ * $Id: namedvalue_to_zval.c,v 1.3 2001/01/30 06:43:35 eriksson Exp $
* vim: syntax=c tabstop=2 shiftwidth=2
*/
@@ -83,7 +83,7 @@
const CORBA_any * pSource, zval * pDestination)
{
int i;
- int length = 0;
+ int length = 0, step;
void ** pp_members = NULL;
zend_bool success = FALSE;
CORBA_NamedValue source_item;
@@ -121,13 +121,17 @@
array_init(pDestination);
#endif
+ step = content_type->length ? content_type->length : 1;
+
for (i = 0; i < length; i++)
{
p_destination_item = NULL;
memset(&source_item, 0, sizeof(CORBA_NamedValue));
source_item.argument._type = content_type;
- source_item.argument._value = &pp_members[i];
+ source_item.argument._value = pp_members;
+
+ pp_members += step;
ALLOC_ZVAL(p_destination_item);
@@ -236,6 +240,7 @@
}
}
+ return TRUE;
error:
return FALSE;
@@ -292,7 +297,7 @@
default:
/* printf("unsupported corba TCKind %i\n", kind);*/
-/* php_error(E_WARNING, "unsupported corba TCKind %i", kind);*/
+ zend_error(E_WARNING, "(satellite) unsupported corba TCKind %i", kind);
}
return success;
Index: php4/ext/satellite/typecode.c
diff -u php4/ext/satellite/typecode.c:1.2 php4/ext/satellite/typecode.c:1.3
--- php4/ext/satellite/typecode.c:1.2 Fri Sep 1 15:29:00 2000
+++ php4/ext/satellite/typecode.c Mon Jan 29 22:43:35 2001
@@ -17,7 +17,7 @@
*/
/*
- * $Id: typecode.c,v 1.2 2000/09/01 22:29:00 eriksson Exp $
+ * $Id: typecode.c,v 1.3 2001/01/30 06:43:35 eriksson Exp $
* vim: syntax=c tabstop=2 shiftwidth=2
*/
@@ -132,8 +132,7 @@
if (type_code == NULL)
{
-/* printf("unknown type for member %s\n",
- IDL_IDENT(IDL_LIST(declaration).data).str);*/
+ zend_error(E_WARNING, "(Satellite) unknown type for member %s",
IDL_IDENT(IDL_LIST(declaration).data).str);
goto error;
}