From 98a66242abe688d852ec46f4298a364fc0124995 Mon Sep 17 00:00:00 2001 From: Niclas Eklund Date: Tue, 14 Dec 2010 15:46:57 +0100 Subject: Support for recursive unions and structs. Break loop if recursive TypeCode. --- lib/ic/doc/src/notes.xml | 38 +++++++++++++++++++++++++- lib/ic/vsn.mk | 19 +------------ lib/orber/doc/src/ch_idl_to_erlang_mapping.xml | 37 +++++++++++++++++++++++-- lib/orber/doc/src/notes.xml | 30 ++++++++++++++++++++ lib/orber/src/cdr_decode.erl | 21 ++++++++++---- lib/orber/vsn.mk | 27 +----------------- 6 files changed, 119 insertions(+), 53 deletions(-) diff --git a/lib/ic/doc/src/notes.xml b/lib/ic/doc/src/notes.xml index dbafde7b4b..45ba233051 100644 --- a/lib/ic/doc/src/notes.xml +++ b/lib/ic/doc/src/notes.xml @@ -4,7 +4,7 @@
- 19982009 + 19982010 Ericsson AB. All Rights Reserved. @@ -30,6 +30,42 @@ notes.xml
+
+ IC 4.2.26 + +
+ Improvements and New Features + + +

+ Partial support for recursive structs and unions. Only available + for the erl_corba backend and requires that Light IFR is used. + I.e. the IC option {light_ifr, true} and that Orber is configured + in such a way that Light IFR is activated. Recursive TypeCode is + currently not supported.

+

+ Own Id: OTP-8868 Aux Id: seq11633

+
+
+
+
+ +
+ IC 4.2.25 + +
+ Improvements and New Features + + +

+ The documentation can now be built and installed without Java.

+

+ Own Id: OTP-8639 Aux Id:

+
+
+
+
+
IC 4.2.24 diff --git a/lib/ic/vsn.mk b/lib/ic/vsn.mk index e0fccf4889..6d6c7fa625 100644 --- a/lib/ic/vsn.mk +++ b/lib/ic/vsn.mk @@ -1,18 +1 @@ -IC_VSN = 4.2.24 - -TICKETS = OTP-8307 \ - OTP-8353 \ - OTP-8354 \ - OTP-8355 - -TICKETS_4.2.23 = OTP-8201 - -TICKETS_4.2.22 = OTP-8088 - -TICKETS_4.2.21 = OTP-7982 - -TICKETS_4.2.20 = OTP-7837 - -TICKETS_4.2.19 = OTP-7595 - -TICKETS_4.2.18 = OTP-7313 +IC_VSN = 4.2.26 diff --git a/lib/orber/doc/src/ch_idl_to_erlang_mapping.xml b/lib/orber/doc/src/ch_idl_to_erlang_mapping.xml index a97ad65f0e..964ae3e92d 100644 --- a/lib/orber/doc/src/ch_idl_to_erlang_mapping.xml +++ b/lib/orber/doc/src/ch_idl_to_erlang_mapping.xml @@ -4,7 +4,7 @@
- 19972009 + 19972010 Ericsson AB. All Rights Reserved. @@ -445,7 +445,19 @@ void op(in myEnum a);
Struct Data Type

A struct may have Basic, Template, Scoped Names and Constructed - types as members.

+ types as members. By using forward declaration we can define a recursive struct:

+ myStructSeq; +struct myStruct { + myStructSeq chain; +}; + +// Deprecated definition (anonymous) not supported by IC +struct myStruct { + sequence chain; +}; + ]]>
@@ -510,6 +522,25 @@ union LongUnion2 switch(long) { default: boolean DefaultValue; }; +

In the same way as structs, unions can be recursive if forward + declaration is used (anonymous types is deprecated and not supported):

+ myUnionSeq; +union myUnion switch (long) { + case 1 : myUnionSeq chain; + default: boolean DefaultValue; +}; + ]]> + + +

Recursive types (union and struct) require Light IFR. I.e. the + IC option {light_ifr, true} is used and that Orber is configured in such a way that + Light IFR is activated. Recursive TypeCode is currently not supported, which is + why these cannot be encapsulated in an any data type.

+
+

Every field in, for example, a struct must be initiated. Otherwise @@ -890,7 +921,7 @@ attribute long RWAttribute; object internal state with its object reference. The object internal state is an Erlang term which has a format defined by the user.

-

It is is not always the case that the internal state will be the first parameter, as stubs can use their own object reference as the first parameter (see the IC documentation).

+

It is not always the case that the internal state will be the first parameter, as stubs can use their own object reference as the first parameter (see the IC documentation).

A function call will invoke an operation. The first parameter of the function should be the object reference and then diff --git a/lib/orber/doc/src/notes.xml b/lib/orber/doc/src/notes.xml index 6eda16a517..1e2cdd05ba 100644 --- a/lib/orber/doc/src/notes.xml +++ b/lib/orber/doc/src/notes.xml @@ -32,6 +32,36 @@ notes.xml

+
+ Orber 3.6.19 + +
+ Improvements and New Features + + +

+ Partial support for recursive structs and unions. + Only available for the erl_corba backend and requires + that Light IFR is used. I.e. the IC option {light_ifr, true} + and that Orber is configured in such a way that Light IFR + is activated. Recursive TypeCode is currently not supported.

+

+ Own Id: OTP-8868 Aux Id: seq11633

+
+
+
+
+ Fixed Bugs and Malfunctions + + +

The SSL option {ssl_imp, old} was not used if ssl_generation was + set to 2. Only R14B was affected by this.

+

Own Id: OTP-8994 Aux Id:seq11747

+
+
+
+
+
Orber 3.6.18
diff --git a/lib/orber/src/cdr_decode.erl b/lib/orber/src/cdr_decode.erl index 68f248364b..36ef6ce02f 100644 --- a/lib/orber/src/cdr_decode.erl +++ b/lib/orber/src/cdr_decode.erl @@ -1273,7 +1273,9 @@ get_user_exception_type(TypeId) -> %%----------------------------------------------------------------- dec_type_code(Version, Message, Len, ByteOrder, Buff, C) -> {TypeNo, Message1, Len1, NewC} = dec_type('tk_ulong', Version, Message, Len, ByteOrder, Buff, C), - dec_type_code(TypeNo, Version, Message1, Len1, ByteOrder, Buff, NewC). + TC = dec_type_code(TypeNo, Version, Message1, Len1, ByteOrder, Buff, NewC), + erase(orber_indirection), + TC. %%----------------------------------------------------------------- %% Func: dec_type_code/5 @@ -1482,13 +1484,22 @@ dec_type_code(33, Version, Message, Len, ByteOrder, Buff, C) -> {"name", {'tk_string', 0}}]}, Version, Rest1, 1, ByteOrder1, Buff, C+1+Ex), {{'tk_local_interface', RepId, Name}, Message1, Len1, NewC}; -dec_type_code(16#ffffffff, Version, Message, Len, ByteOrder, Buff, C) -> %% placeholder +dec_type_code(16#ffffffff, Version, Message, Len, ByteOrder, Buff, C) -> {Indirection, Message1, Len1, NewC} = dec_type('tk_long', Version, Message, Len, ByteOrder, Buff, C), Position = C+Indirection, - <<_:Position/binary, SubBuff/binary>> = Buff, - {TC, _, _, _} = dec_type_code(Version, SubBuff, Position, ByteOrder, Buff, Position), - {TC, Message1, Len1, NewC}; + case put(orber_indirection, Position) of + Position -> +%% {{'none', Indirection}, Message1, Len1, NewC}; + %% Recursive TypeCode. Break the loop. + orber:dbg("[~p] cdr_decode:dec_type_code(~p); Recursive TC not supported.", + [?LINE,Position], ?DEBUG_LEVEL), + corba:raise(#'MARSHAL'{completion_status=?COMPLETED_NO}); + _ -> + <<_:Position/binary, SubBuff/binary>> = Buff, + {TC, _, _, _} = dec_type_code(Version, SubBuff, Position, ByteOrder, Buff, Position), + {TC, Message1, Len1, NewC} + end; dec_type_code(Type, _, _, _, _, _, _) -> orber:dbg("[~p] cdr_decode:dec_type_code(~p); No match.", [?LINE, Type], ?DEBUG_LEVEL), diff --git a/lib/orber/vsn.mk b/lib/orber/vsn.mk index c405326e9a..c973316412 100644 --- a/lib/orber/vsn.mk +++ b/lib/orber/vsn.mk @@ -1,27 +1,2 @@ -ORBER_VSN = 3.6.18 - -TICKETS = OTP-8900 - -TICKETS_3.6.17 = OTP-8840 - -TICKETS_3.6.16 = OTP-8543 \ - OTP-8489 - -TICKETS_3.6.15 = OTP-8353 \ - OTP-8354 \ - OTP-8374 \ - OTP-8409 \ - OTP-8448 - -TICKETS_3.6.14 = OTP-8201 - -TICKETS_3.6.14 = OTP-8201 - -TICKETS_3.6.13 = OTP-7987 - -TICKETS_3.6.12 = OTP-7906 - -TICKETS_3.6.11 = OTP-7837 - -TICKETS_3.6.10 = OTP-7595 +ORBER_VSN = 3.6.19 -- cgit v1.2.3