This commit is contained in:
Jonas Kulla 2014-01-01 12:56:45 +01:00
parent 7a1dd2588d
commit 1bacceddf0
11 changed files with 34 additions and 1 deletions

View file

@ -332,6 +332,7 @@ runRMXPScripts(mrb_state *mrb, mrbc_context *ctx)
i, RSTRING_PTR(scriptName));
showError(buffer);
break;
}

View file

@ -347,6 +347,7 @@ MRB_METHOD(fileEachLine)
while (feof(f) == 0)
{
GUARD_ERRNO( readLine(f, buffer); )
if (buffer.empty() && feof(f) != 0)
break;
@ -373,6 +374,7 @@ MRB_METHOD(fileEachByte)
while (feof(f) == 0)
{
mrb_int byte = fgetc(f);
if (byte == -1)
break;
@ -473,6 +475,7 @@ MRB_METHOD(fileReadLines)
while (feof(f) == 0)
{
GUARD_ERRNO( readLine(f, buffer); )
if (buffer.empty() && feof(f) != 0)
break;

View file

@ -793,23 +793,27 @@ write_value(MarshalContext *ctx, mrb_value value)
ctx->writeByte(TYPE_FALSE);
else
ctx->writeByte(TYPE_NIL);
break;
case MRB_TT_FIXNUM :
ctx->writeByte(TYPE_FIXNUM);
write_fixnum(ctx, mrb_fixnum(value));
break;
case MRB_TT_FLOAT :
ctx->writeByte(TYPE_FLOAT);
write_float(ctx, mrb_float(value));
ctx->objects.add(value);
break;
case MRB_TT_STRING :
ctx->objects.add(value);
ctx->writeByte(TYPE_STRING);
write_string_value(ctx, value);
break;
case MRB_TT_ARRAY :

View file

@ -118,17 +118,20 @@ MRB_METHOD(tableSetAt)
case 2 :
x = fix(argv[0]);
value = fix(argv[1]);
break;
case 3 :
x = fix(argv[0]);
y = fix(argv[1]);
value = fix(argv[2]);
break;
case 4 :
x = fix(argv[0]);
y = fix(argv[1]);
z = fix(argv[2]);
value = fix(argv[3]);
break;
}