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:
Justin Ethier 2018-12-07 17:00:32 -05:00
parent c625e8b0e6
commit d5690a001e

View file

@ -1351,9 +1351,10 @@ typedef union {
complex_num_type complex_num_t;
} common_type;
#define return_copy(ptr, obj) \
#define return_copy(ptr, o) \
{ \
tag_type t; \
object obj = o; \
if (!is_object_type(obj)) \
return obj; \
t = type_of(obj); \