@@ -186,7 +186,7 @@ mrc_pm_parse(mrc_ccontext *c)
186
186
// save top-level locals for IRB
187
187
pm_program_node_t * program = (pm_program_node_t * )node ;
188
188
uint32_t nlocals = program -> locals .size ;
189
- pm_options_t * options = (pm_options_t * )mrc_malloc (c -> mrb , sizeof (pm_options_t ));
189
+ pm_options_t * options = (pm_options_t * )mrc_malloc (c , sizeof (pm_options_t ));
190
190
memset (options , 0 , sizeof (pm_options_t ));
191
191
pm_string_t * encoding = & options -> encoding ;
192
192
pm_string_constant_init (encoding , "UTF-8" , 5 );
@@ -201,7 +201,7 @@ mrc_pm_parse(mrc_ccontext *c)
201
201
scope_local = & options_scope -> locals [i ];
202
202
id = program -> locals .ids [i ];
203
203
local = pm_constant_pool_id_to_constant (& c -> p -> constant_pool , id );
204
- allocated = (char * )mrc_malloc (c -> mrb , local -> length );
204
+ allocated = (char * )mrc_malloc (c , local -> length );
205
205
memcpy (allocated , local -> start , local -> length );
206
206
pm_string_constant_init (scope_local , (const char * )allocated , local -> length );
207
207
}
@@ -224,7 +224,7 @@ mrc_parse_file_cxt(mrc_ccontext *c, const char **filenames, uint8_t **source)
224
224
while (filenames [filecount ]) {
225
225
filecount ++ ;
226
226
}
227
- c -> filename_table = (mrc_filename_table * )mrc_malloc (c -> mrb , sizeof (mrc_filename_table ) * filecount );
227
+ c -> filename_table = (mrc_filename_table * )mrc_malloc (c , sizeof (mrc_filename_table ) * filecount );
228
228
c -> filename_table_length = filecount ;
229
229
c -> current_filename_index = 0 ;
230
230
ssize_t length = read_input_files (c , filenames , source , c -> filename_table );
@@ -258,7 +258,7 @@ mrc_parse_string_cxt(mrc_ccontext *c, const uint8_t **source, size_t length)
258
258
{
259
259
pm_string_t string ;
260
260
pm_string_owned_init (& string , (uint8_t * )source , length );
261
- c -> filename_table = (mrc_filename_table * )mrc_malloc (c -> mrb , sizeof (mrc_filename_table ));
261
+ c -> filename_table = (mrc_filename_table * )mrc_malloc (c , sizeof (mrc_filename_table ));
262
262
c -> filename_table [0 ].filename = "-e" ;
263
263
c -> filename_table [0 ].start = 0 ;
264
264
c -> filename_table_length = 1 ;
0 commit comments