Skip to content

Commit ca3eec2

Browse files
committed
fix gem bugs
1 parent 2c9bc03 commit ca3eec2

File tree

4 files changed

+5
-5
lines changed

4 files changed

+5
-5
lines changed

mrbgems/picoruby-filesystem-fat/src/mruby/fat.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -310,7 +310,7 @@ void
310310
mrb_FAT_init_spi(mrb_state *mrb, mrb_value self)
311311
{
312312
const char *unit_name;
313-
int sck, cipo, copi, cs;
313+
mrb_int sck, cipo, copi, cs;
314314
mrb_get_args(mrb, "ziiii", &unit_name, &sck, &cipo, &copi, &cs);
315315
if (FAT_set_spi_unit(unit_name, sck, cipo, copi, cs) < 0) {
316316
mrb_raise(mrb, E_RUNTIME_ERROR, "Invalid SPI unit.");

mrbgems/picoruby-filesystem-fat/src/mruby/fat_file.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -87,8 +87,8 @@ static mrb_value
8787
mrb_seek(mrb_state *mrb, mrb_value self)
8888
{
8989
FIL *fp = (FIL *)mrb_data_get_ptr(mrb, self, &mrb_fat_file_type);
90-
int ofs;
91-
int whence;
90+
mrb_int ofs;
91+
mrb_int whence;
9292
mrb_get_args(mrb, "ii", &ofs, &whence);
9393
FSIZE_t size = f_size(fp);
9494
FSIZE_t new_pos;

mrbgems/picoruby-i2c/src/mruby/i2c.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@ mrb__read(mrb_state *mrb, mrb_value self)
4242

4343
mrb_value duration_1byte = mrb_iv_get(mrb, self, MRB_IVSYM(duration_1byte));
4444

45-
int ary_len = RARRAY_LEN(outputs);
45+
mrb_int ary_len = RARRAY_LEN(outputs);
4646
uint8_t rxdata[ary_len];
4747
int ret = I2C_read_timeout_us(
4848
(uint8_t)i2c_adrs_7,

mrbgems/picoruby-shell/shell_executables/cat.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
if File.file?(arg)
33
File.open arg, "r" do |f|
44
f.each_line do |line|
5-
puts line
5+
print line
66
end
77
end
88
else

0 commit comments

Comments
 (0)