Remove redundant structs

This commit is contained in:
Kitaiti Makoto 2026-06-12 17:17:02 +09:00
parent 4f784eebe3
commit 31909b814c
5 changed files with 7 additions and 14 deletions

View File

@ -103,19 +103,12 @@ typedef struct parsed_samples_t {
bool memview_exported;
} parsed_samples_t;
typedef struct full_args {
VALUE *context;
VALUE *params;
float *samples;
int n_samples;
} full_args;
typedef struct {
VALUE *context;
VALUE *params;
float *samples;
int n_samples;
} ruby_whisper_parakeet_context_full_args;
} ruby_whisper_full_args;
typedef struct {
struct parakeet_full_params params;

View File

@ -479,7 +479,7 @@ full_ubf(void *rb_args)
VALUE
full_body(VALUE rb_args)
{
full_args *args = (full_args *)rb_args;
ruby_whisper_full_args *args = (ruby_whisper_full_args *)rb_args;
ruby_whisper *rw;
ruby_whisper_params *rwp;
@ -526,7 +526,7 @@ VALUE ruby_whisper_full(int argc, VALUE *argv, VALUE self)
VALUE n_samples = argc == 2 ? Qnil : argv[2];
struct parsed_samples_t parsed = parse_samples(&argv[1], &n_samples);
full_args args = {
ruby_whisper_full_args args = {
&self,
&argv[0],
parsed.samples,

View File

@ -217,7 +217,7 @@ parakeet_full_ubf(void *rb_args)
VALUE
ruby_whisper_parakeet_context_full_body(VALUE rb_args)
{
ruby_whisper_parakeet_context_full_args *args = (ruby_whisper_parakeet_context_full_args *)rb_args;
ruby_whisper_full_args *args = (ruby_whisper_full_args *)rb_args;
ruby_whisper_parakeet_context *rwpc;
GetParakeetContext(*args->context, rwpc);
ruby_whisper_parakeet_params *rwpp;
@ -254,7 +254,7 @@ ruby_whisper_parakeet_context_full(int argc, VALUE *argv, VALUE self)
VALUE n_samples = argc == 2 ? Qnil : argv[2];
struct parsed_samples_t parsed = parse_samples(&argv[1], &n_samples);
ruby_whisper_parakeet_context_full_args args = {
ruby_whisper_full_args args = {
&self,
&argv[0],
parsed.samples,

View File

@ -38,7 +38,7 @@ ruby_whisper_parakeet_transcribe(VALUE self, VALUE audio_path, VALUE params)
GetParakeetContext(self, rwpc);
GetParakeetParams(params, rwpp);
ruby_whisper_parakeet_context_full_args args = {
ruby_whisper_full_args args = {
&self,
&params,
pcmf32.data(),

View File

@ -81,7 +81,7 @@ ruby_whisper_transcribe(int argc, VALUE *argv, VALUE self) {
return self;
}
full_args args = {
ruby_whisper_full_args args = {
&self,
&params,
pcmf32.data(),