diff options
author | Samuel Williams <[email protected]> | 2019-07-07 22:58:55 +1200 |
---|---|---|
committer | Samuel Williams <[email protected]> | 2019-07-12 11:56:51 +1200 |
commit | 5c8061a9e2a34df975846d724273cb5be7d74a7c (patch) | |
tree | 3ca0bda0e0f380b7d099b81c4c6124d879c2158b /gc.c | |
parent | 012e954b472d2e47b03647ac0c8f745416d7db58 (diff) |
Make `stack_check` slightly easier to use in debugger.
Diffstat (limited to 'gc.c')
-rw-r--r-- | gc.c | 7 |
1 files changed, 4 insertions, 3 deletions
@@ -4385,11 +4385,12 @@ ruby_stack_length(VALUE **p) static int stack_check(rb_execution_context_t *ec, int water_mark) { - int ret; SET_STACK_END; - ret = STACK_LENGTH > STACK_LEVEL_MAX - water_mark; - return ret; + size_t length = STACK_LENGTH; + size_t maximum_length = STACK_LEVEL_MAX - water_mark; + + return length > maximum_length; } #else #define stack_check(ec, water_mark) FALSE |