~ubuntu-branches/debian/squeeze/erlang/squeeze

« back to all changes in this revision

Viewing changes to lib/orber/src/cdrlib.erl

  • Committer: Bazaar Package Importer
  • Author(s): Sergei Golovan
  • Date: 2009-08-05 20:54:29 UTC
  • mfrom: (6.1.2 sid)
  • Revision ID: james.westby@ubuntu.com-20090805205429-pm4pnwew8axraosl
Tags: 1:13.b.1-dfsg-5
* Fixed parentheses in Emacs mode (closes: #536891).
* Removed unnecessary conflicts with erlang-manpages package.
* Added workaround for #475459: disabled threads on sparc architecture.
  This breaks wxErlang, so it's only a temporary solution.

Show diffs side-by-side

added added

removed removed

Lines of Context:
67
67
%%-----------------------------------------------------------------
68
68
%% Func: enc_short/2
69
69
%%-----------------------------------------------------------------
70
 
enc_short(X, Message) when integer(X), X >= ?SHORTMIN, X =< ?SHORTMAX -> 
 
70
enc_short(X, Message) when is_integer(X) andalso X >= ?SHORTMIN andalso X =< ?SHORTMAX -> 
71
71
    [<<X:16/big-signed-integer>> | Message];
72
 
enc_short(X, _Message) when integer(X) -> 
 
72
enc_short(X, _Message) when is_integer(X) -> 
73
73
    orber:dbg("[~p] cdrlib:enc_short(~p); Out of range.", [?LINE, X], ?DEBUG_LEVEL),
74
74
    corba:raise(#'MARSHAL'{minor=(?ORBER_VMCID bor 1), completion_status=?COMPLETED_NO});
75
75
enc_short(X, _Message) ->
90
90
%%-----------------------------------------------------------------
91
91
%% Func: enc_unsigned_short/2
92
92
%%-----------------------------------------------------------------
93
 
enc_unsigned_short(X, Message) when integer(X), X >= ?USHORTMIN, X =< ?USHORTMAX -> 
 
93
enc_unsigned_short(X, Message) when is_integer(X) andalso X >= ?USHORTMIN andalso X =< ?USHORTMAX -> 
94
94
    [<<X:16/big-unsigned-integer>> | Message];
95
 
enc_unsigned_short(X, _Message) when integer(X) -> 
 
95
enc_unsigned_short(X, _Message) when is_integer(X) -> 
96
96
    orber:dbg("[~p] cdrlib:enc_unsigned_short(~p); Out of range.", 
97
97
              [?LINE, X], ?DEBUG_LEVEL),
98
98
    corba:raise(#'MARSHAL'{minor=(?ORBER_VMCID bor 1), completion_status=?COMPLETED_NO});
115
115
%%-----------------------------------------------------------------
116
116
%% Func: enc_long/2
117
117
%%-----------------------------------------------------------------
118
 
enc_long(X, Message) when integer(X), X >= ?LONGMIN, X =< ?LONGMAX -> 
 
118
enc_long(X, Message) when is_integer(X) andalso X >= ?LONGMIN andalso X =< ?LONGMAX -> 
119
119
    [<<X:32/big-signed-integer>> | Message];
120
 
enc_long(X, _Message) when integer(X) -> 
 
120
enc_long(X, _Message) when is_integer(X) -> 
121
121
    orber:dbg("[~p] cdrlib:enc_long(~p); Out of range.",[?LINE, X], ?DEBUG_LEVEL),
122
122
    corba:raise(#'MARSHAL'{minor=(?ORBER_VMCID bor 1), completion_status=?COMPLETED_NO});
123
123
enc_long(X, _Message) ->
139
139
%%-----------------------------------------------------------------
140
140
%% Func: enc_unsigned_long/2
141
141
%%-----------------------------------------------------------------
142
 
enc_unsigned_long(X, Message) when integer(X), X >= ?ULONGMIN, X =< ?ULONGMAX ->
 
142
enc_unsigned_long(X, Message) when is_integer(X) andalso X >= ?ULONGMIN andalso X =< ?ULONGMAX ->
143
143
    [<<X:32/big-unsigned-integer>> | Message];
144
 
enc_unsigned_long(X, _Message) when integer(X) ->
 
144
enc_unsigned_long(X, _Message) when is_integer(X) ->
145
145
    orber:dbg("[~p] cdrlib:enc_unsigned_long(~p); Out of range.", 
146
146
              [?LINE, X], ?DEBUG_LEVEL),
147
147
    corba:raise(#'MARSHAL'{minor=(?ORBER_VMCID bor 1), completion_status=?COMPLETED_NO});
185
185
%%-----------------------------------------------------------------
186
186
%% Func: enc_float/2
187
187
%%-----------------------------------------------------------------
188
 
enc_float(X, Message) when number(X) ->
 
188
enc_float(X, Message) when is_number(X) ->
189
189
    [<<X:32/big-float>> | Message];
190
190
enc_float(X, _Message) ->
191
191
    orber:dbg("[~p] cdrlib:enc_float(~p); not a number.", [?LINE, X], ?DEBUG_LEVEL),
202
202
%%-----------------------------------------------------------------
203
203
%% Func: enc_double/2
204
204
%%-----------------------------------------------------------------
205
 
enc_double(X, Message) when number(X) ->
 
205
enc_double(X, Message) when is_number(X) ->
206
206
    [<<X:64/big-float>> | Message];
207
207
enc_double(X, _Message) ->
208
208
    orber:dbg("[~p] cdrlib:enc_double(~p); not a number.", [?LINE, X], ?DEBUG_LEVEL),
222
222
%%-----------------------------------------------------------------
223
223
%% Func: enc_char/2
224
224
%%-----------------------------------------------------------------
225
 
enc_char(X, Message) when integer(X), X =< 255, X >= 0 -> 
 
225
enc_char(X, Message) when is_integer(X) andalso X =< 255, X >= 0 -> 
226
226
    [<<X:8>> | Message];
227
227
enc_char(X,_) -> 
228
228
    orber:dbg("[~p] cdrlib:enc_char(~p); not a char.", [?LINE, X], ?DEBUG_LEVEL),
240
240
%%-----------------------------------------------------------------
241
241
%% Func: enc_octet/2
242
242
%%-----------------------------------------------------------------
243
 
enc_octet(X, Message) when integer(X), X =< 255, X >= 0 -> 
 
243
enc_octet(X, Message) when is_integer(X) andalso X =< 255, X >= 0 -> 
244
244
    [<<X:8/big-unsigned-integer>> | Message];
245
245
enc_octet(X, _Message) ->
246
246
    orber:dbg("[~p] cdrlib:enc_octet(~p); not an octet.", [?LINE, X], ?DEBUG_LEVEL),
298
298
%%-----------------------------------------------------------------
299
299
%% Func: enc_longlong/2
300
300
%%-----------------------------------------------------------------
301
 
enc_longlong(X, Message) when integer(X), X >= ?LONGLONGMIN, X =< ?LONGLONGMAX -> 
 
301
enc_longlong(X, Message) when is_integer(X) andalso X >= ?LONGLONGMIN andalso X =< ?LONGLONGMAX -> 
302
302
    [<<X:64/big-signed-integer>> | Message];
303
 
enc_longlong(X, _Message) when integer(X) -> 
 
303
enc_longlong(X, _Message) when is_integer(X) -> 
304
304
    orber:dbg("[~p] cdrlib:enc_longlong(~p); Out of range.", 
305
305
              [?LINE, X], ?DEBUG_LEVEL),
306
306
    corba:raise(#'MARSHAL'{minor=(?ORBER_VMCID bor 1), completion_status=?COMPLETED_NO});
320
320
%%-----------------------------------------------------------------
321
321
%% Func: enc_unsigned_longlong/2
322
322
%%-----------------------------------------------------------------
323
 
enc_unsigned_longlong(X, Message) when integer(X), X >= ?ULONGLONGMIN, X =< ?ULONGLONGMAX ->
 
323
enc_unsigned_longlong(X, Message) when is_integer(X) andalso X >= ?ULONGLONGMIN andalso X =< ?ULONGLONGMAX ->
324
324
    [<<X:64/big-unsigned-integer>> | Message];
325
 
enc_unsigned_longlong(X, _Message) when integer(X) ->
 
325
enc_unsigned_longlong(X, _Message) when is_integer(X) ->
326
326
    orber:dbg("[~p] cdrlib:enc_unsigned_longlong(~p); Out of range.", 
327
327
              [?LINE, X], ?DEBUG_LEVEL),
328
328
    corba:raise(#'MARSHAL'{minor=(?ORBER_VMCID bor 1), completion_status=?COMPLETED_NO});