mirror of
https://github.com/justinethier/cyclone.git
synced 2025-05-24 04:25:06 +02:00
Do not assume return_copy
receives an object.
It may be passed a call instead, in which case we want to refer to the call as a local variable instead of making that call more than once!
This commit is contained in:
parent
c625e8b0e6
commit
d5690a001e
1 changed files with 2 additions and 1 deletions
|
@ -1351,9 +1351,10 @@ typedef union {
|
||||||
complex_num_type complex_num_t;
|
complex_num_type complex_num_t;
|
||||||
} common_type;
|
} common_type;
|
||||||
|
|
||||||
#define return_copy(ptr, obj) \
|
#define return_copy(ptr, o) \
|
||||||
{ \
|
{ \
|
||||||
tag_type t; \
|
tag_type t; \
|
||||||
|
object obj = o; \
|
||||||
if (!is_object_type(obj)) \
|
if (!is_object_type(obj)) \
|
||||||
return obj; \
|
return obj; \
|
||||||
t = type_of(obj); \
|
t = type_of(obj); \
|
||||||
|
|
Loading…
Add table
Reference in a new issue