0
I agree with @User1 about RB_pop() and would like to add on to it:
If you want to prevent the function from returning false as an unexpected return value, you can make the function void and have a second parameter for data that will update the argument passed into it. Also, by making it void, ...