ext/session: remove the redundant convert_to_long

This commit is contained in:
c9s 2019-03-12 20:21:38 +08:00 committed by Nikita Popov
parent 8bb5582751
commit a59881fa04

View File

@ -189,13 +189,14 @@ PS_GC_FUNC(user)
ps_call_handler(&PSF(gc), 1, args, &retval);
if (Z_TYPE(retval) == IS_LONG) {
convert_to_long(&retval);
return Z_LVAL(retval);
}
/* This is for older API compatibility */
if (Z_TYPE(retval) == IS_TRUE) {
return 1;
}
/* Anything else is some kind of error */
return -1; // Error
}