MRI-Binding: Optimize RB_ARG_END vaarg guard

It's enough to check this only in debug mode.
Make this an empty define in release mode.
This commit is contained in:
Jonas Kulla 2013-12-20 11:29:12 +01:00
parent d7ceff91a2
commit c504a383ba
16 changed files with 61 additions and 52 deletions

View file

@ -244,6 +244,8 @@ rb_get_args(int argc, VALUE *argv, const char *format, ...)
}
}
#ifndef QT_NO_DEBUG
/* Pop remaining arg pointers off
* the stack to check for RB_ARG_END */
format--;
@ -287,7 +289,9 @@ rb_get_args(int argc, VALUE *argv, const char *format, ...)
/* Verify correct termination */
void *argEnd = va_arg(ap, void*);
Q_UNUSED(argEnd);
Q_ASSERT(argEnd == RB_ARG_END);
Q_ASSERT(argEnd == RB_ARG_END_VAL);
#endif
va_end(ap);