aboutsummaryrefslogtreecommitdiffstats
path: root/lib/ic/src/ic_pragma.erl
diff options
context:
space:
mode:
authorErlang/OTP <[email protected]>2010-12-16 14:34:26 +0100
committerErlang/OTP <[email protected]>2010-12-16 14:34:26 +0100
commit73205a499c16781ecd064ec2446d502b3c0d01b6 (patch)
tree260a1805f06a1ecef92d03d29853dbddb0bbd803 /lib/ic/src/ic_pragma.erl
parent99e34bba1a60b262e24496cc9288b549360c6377 (diff)
parent98a66242abe688d852ec46f4298a364fc0124995 (diff)
downloadotp-73205a499c16781ecd064ec2446d502b3c0d01b6.tar.gz
otp-73205a499c16781ecd064ec2446d502b3c0d01b6.tar.bz2
otp-73205a499c16781ecd064ec2446d502b3c0d01b6.zip
Merge branch 'nick/orber/recursive_types/OTP-8868' into maint-r14
* nick/orber/recursive_types/OTP-8868: Support for recursive unions and structs. Break loop if recursive TypeCode. Added basic tests for recursive uinions and structs. Removed test code. Added partial support for recursive IDL types. Conflicts: lib/ic/doc/src/notes.xml lib/ic/vsn.mk lib/orber/vsn.mk
Diffstat (limited to 'lib/ic/src/ic_pragma.erl')
-rw-r--r--lib/ic/src/ic_pragma.erl12
1 files changed, 9 insertions, 3 deletions
diff --git a/lib/ic/src/ic_pragma.erl b/lib/ic/src/ic_pragma.erl
index 9165e3b03b..45cb64c9c8 100644
--- a/lib/ic/src/ic_pragma.erl
+++ b/lib/ic/src/ic_pragma.erl
@@ -1,7 +1,7 @@
%%
%% %CopyrightBegin%
%%
-%% Copyright Ericsson AB 1998-2009. All Rights Reserved.
+%% Copyright Ericsson AB 1998-2010. All Rights Reserved.
%%
%% The contents of this file are subject to the Erlang Public License,
%% Version 1.1, (the "License"); you may not use this file except in
@@ -60,7 +60,7 @@ pragma_reg(G,X) ->
init_pragma_status(S),
registerOptions(G,S),
pragma_reg_all(G, S, [], X),
- denote_specific_code_opts(G), %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+ denote_specific_code_opts(G),
case get_pragma_compilation_status(S) of
true ->
%% Remove ugly pragmas from form
@@ -132,6 +132,7 @@ applyCodeOpt(G) ->
%% This removes all pragma records from the form.
%% When debugged, it can be enbodied in pragma_reg_all.
+cleanup(undefined,C) -> C;
cleanup([],C) -> C;
cleanup([X|Xs],CSF) ->
cleanup(Xs, CSF++cleanup(X)).
@@ -279,7 +280,12 @@ pragma_reg(G, S, N, X) when is_record(X, union) ->
pragma_reg(G, S, N, X) when is_record(X, struct) ->
mk_ref(G,[get_id2(X) | N],struct_ref),
mk_file_data(G,X,N,struct),
- pragma_reg_all(G, S, N, X#struct.body);
+ case X#struct.body of
+ undefined ->
+ ok;
+ _ ->
+ pragma_reg_all(G, S, N, X#struct.body)
+ end;
pragma_reg(G, _S, N, X) when is_record(X, attr) ->
XX = #id_of{type=X},