}
#define zendi_convert_scalar_to_number(op, holder, result) \
- if (op==result) { \
+ if (op==result || op->refcount == 0) { \
if (op->type != IS_LONG) { \
convert_scalar_to_number(op TSRMLS_CC); \
} \
} while (0)
#define zendi_convert_to_long(op, holder, result) \
- if (op==result) { \
+ if (op == result || op->refcount == 0) { \
convert_to_long(op); \
} else if ((op)->type != IS_LONG) { \
switch ((op)->type) { \
#define zendi_convert_to_boolean(op, holder, result) \
- if (op==result) { \
+ if (op==result || op->refcount == 0) { \
convert_to_boolean(op); \
} else if ((op)->type != IS_BOOL) { \
switch ((op)->type) { \