diff options
author | David Eriksson <eriksson@php.net> | 2001-01-30 06:43:36 +0000 |
---|---|---|
committer | David Eriksson <eriksson@php.net> | 2001-01-30 06:43:36 +0000 |
commit | 4320dc0a2c75fba5f939cf3867d8334f0276ec58 (patch) | |
tree | 25ed865dc6c1ed5d7847f759e3c8b02c9ad2c937 | |
parent | 79a39e3d396168f8d2a4a4070a8ebf893a33ee7c (diff) | |
download | php-git-4320dc0a2c75fba5f939cf3867d8334f0276ec58.tar.gz |
Applied patch from Oleg Sharoiko <os@rsu.ru> to fix bug in satellite_any_to_zval_sequence
-rw-r--r-- | ext/satellite/namedvalue_to_zval.c | 11 | ||||
-rw-r--r-- | ext/satellite/typecode.c | 3 |
2 files changed, 9 insertions, 5 deletions
diff --git a/ext/satellite/namedvalue_to_zval.c b/ext/satellite/namedvalue_to_zval.c index 2ddf9072d3..7e262f51c1 100644 --- a/ext/satellite/namedvalue_to_zval.c +++ b/ext/satellite/namedvalue_to_zval.c @@ -83,7 +83,7 @@ static zend_bool satellite_any_to_zval_sequence( 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 @@ static zend_bool satellite_any_to_zval_sequence( 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 @@ static zend_bool satellite_any_to_zval_struct( } } + return TRUE; error: return FALSE; @@ -292,7 +297,7 @@ zend_bool satellite_any_to_zval( 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; diff --git a/ext/satellite/typecode.c b/ext/satellite/typecode.c index 18564c8382..df16108094 100644 --- a/ext/satellite/typecode.c +++ b/ext/satellite/typecode.c @@ -132,8 +132,7 @@ static CORBA_StructMemberSeq * orbit_create_member_sequence(IDL_tree member_list 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; } |