cli_ure/source/climaker/climaker_emit.cxx | 21 +++++++++++++-------- 1 file changed, 13 insertions(+), 8 deletions(-)
New commits: commit 60a64d1807b075fb630774adf950612d71734171 Author: David Ostrovsky <[email protected]> Date: Tue Feb 3 10:41:32 2015 +0100 climaker: Fix handling incomplete types The order in which the hash table of incomplete structure types is iterated is non-deterministic. Make sure that the array fields are complete types before they are assigned. This fixed weird error on Windows 64 bit. The reason this bug wasn't hitting on 32 bit Windows build is because the generation order was different and by chance the referenced fields were already generated. Change-Id: Ifc8622b420fc25fea5a0ac8c09d08f7804c9b77c Reviewed-on: https://gerrit.libreoffice.org/13851 Reviewed-by: Michael Stahl <[email protected]> Reviewed-by: Andras Timar <[email protected]> Tested-by: Andras Timar <[email protected]> diff --git a/cli_ure/source/climaker/climaker_emit.cxx b/cli_ure/source/climaker/climaker_emit.cxx index ee7e2c9..6f0de95 100644 --- a/cli_ure/source/climaker/climaker_emit.cxx +++ b/cli_ure/source/climaker/climaker_emit.cxx @@ -1268,8 +1268,19 @@ Assembly ^ TypeEmitter::type_resolve( } else { - field_type = - get_type( pseq_members[ member_pos ] ); + field_type = get_type( pseq_members[ member_pos ] ); + + if (field_type->IsArray + && m_incomplete_structs[cts_name] + && !field_type->Namespace->Equals("System")) + { + //Find the value type. In case of sequence<sequence< ... > > find the actual value type + ::System::Type ^ value = field_type; + while ((value = value->GetElementType())->IsArray); + //If the value type is a struct then make sure it is fully created. + get_complete_struct(value->FullName); + field_type = get_type(pseq_members[member_pos]); + } } members[ member_pos ] = entry->m_type_builder->DefineField( @@ -1340,12 +1351,6 @@ Assembly ^ TypeEmitter::type_resolve( } else if (field_type->IsArray) { - //Find the value type. In case of sequence<sequence< ... > > find the actual value type - ::System::Type ^ value = field_type; - while ((value = value->GetElementType())->IsArray); - //If the value type is a struct then make sure it is fully created. - get_complete_struct(value->FullName); - code->Emit( Emit::OpCodes::Ldarg_0 ); code->Emit( Emit::OpCodes::Ldc_I4_0 ); code->Emit( _______________________________________________ Libreoffice-commits mailing list [email protected] http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
