Reduce if
This commit is contained in:
parent
f55f3f347c
commit
3bae1e2f1b
|
|
@ -132,19 +132,11 @@ typedef struct {
|
|||
|
||||
#define GetParakeetParams(obj, rwpp) do { \
|
||||
TypedData_Get_Struct((obj), ruby_whisper_parakeet_params, &ruby_whisper_parakeet_params_type, (rwpp)); \
|
||||
if (!(rwpp)->new_segment_callback_container) { \
|
||||
rb_raise(rb_eRuntimeError, "Not initialized"); \
|
||||
} \
|
||||
if (!(rwpp)->new_token_callback_container) { \
|
||||
rb_raise(rb_eRuntimeError, "Not initialized"); \
|
||||
} \
|
||||
if (!(rwpp)->progress_callback_container) { \
|
||||
rb_raise(rb_eRuntimeError, "Not initialized"); \
|
||||
} \
|
||||
if (!(rwpp)->encoder_begin_callback_container) { \
|
||||
rb_raise(rb_eRuntimeError, "Not initialized"); \
|
||||
} \
|
||||
if (!(rwpp)->abort_callback_container) { \
|
||||
if (!(rwpp)->new_segment_callback_container || \
|
||||
!(rwpp)->new_token_callback_container || \
|
||||
!(rwpp)->progress_callback_container || \
|
||||
!(rwpp)->encoder_begin_callback_container || \
|
||||
!(rwpp)->abort_callback_container) { \
|
||||
rb_raise(rb_eRuntimeError, "Not initialized"); \
|
||||
} \
|
||||
} while (0)
|
||||
|
|
|
|||
|
|
@ -0,0 +1,9 @@
|
|||
#include "ruby_whisper.h"
|
||||
|
||||
|
||||
|
||||
void
|
||||
init_ruby_whisper_parakeet_context(VALUE *mParakeet)
|
||||
{
|
||||
VALUE cParakeetContext = rb_define_class_under(*mParakeet, "Context", rb_cObject);
|
||||
}
|
||||
Loading…
Reference in New Issue