Commit 4b8959da authored by Yuichiro MASUI's avatar Yuichiro MASUI

Merge branch 'master' into use_ruby_for_building

parents 06d242ae 404ad702
......@@ -49,6 +49,7 @@ struct RProc {
struct RProc *mrb_proc_new(mrb_state*, mrb_irep*);
struct RProc *mrb_proc_new_cfunc(mrb_state*, mrb_func_t);
struct RProc *mrb_closure_new(mrb_state*, mrb_irep*);
struct RProc *mrb_closure_new_cfunc(mrb_state *mrb, mrb_func_t func, int nlocals);
void mrb_proc_copy(struct RProc *a, struct RProc *b);
#include "mruby/khash.h"
......
......@@ -145,7 +145,7 @@ for_each_gem (char before[1024], char after[1024],
{
/* active GEM check */
FILE *active_gem_file;
char gem_char;
int gem_char;
char gem_name[1024] = { 0 };
int char_index;
char gem_list[1024][1024] = { { 0 }, { 0 } };
......@@ -166,7 +166,7 @@ for_each_gem (char before[1024], char after[1024],
char_index = 0;
gem_index = 0;
skip = FALSE;
while((gem_char = fgetc(active_gem_file)) != EOF) {
while ((gem_char = fgetc(active_gem_file)) != EOF) {
if (gem_char == '\n') {
/* Every line contains one active GEM */
gem_name[char_index++] = '\0';
......
......@@ -888,6 +888,7 @@ mrb_singleton_class(mrb_state *mrb, mrb_value v)
case MRB_TT_TRUE:
return mrb_obj_value(mrb->true_class);
case MRB_TT_MAIN:
case MRB_TT_VOIDP:
return mrb_obj_value(mrb->object_class);
case MRB_TT_SYMBOL:
case MRB_TT_FIXNUM:
......
......@@ -1390,7 +1390,7 @@ mrb_run(mrb_state *mrb, struct RProc *proc, mrb_value self)
x = mrb_fixnum(regs[a]);
y = mrb_fixnum(regs[a+1]);
z = x - y;
if (((x < 0) ^ (y < 0)) == 0 && (x < 0) != (z < 0)) {
if (((x < 0) ^ (y < 0)) != 0 && (x < 0) != (z < 0)) {
/* integer overflow */
SET_FLT_VALUE(regs[a], (mrb_float)x - (mrb_float)y);
break;
......@@ -1532,7 +1532,7 @@ mrb_run(mrb_state *mrb, struct RProc *proc, mrb_value self)
mrb_int y = GETARG_C(i);
mrb_int z = x - y;
if (((x < 0) ^ (y < 0)) == 0 && (x < 0) != (z < 0)) {
if (((x < 0) ^ (y < 0)) != 0 && (x < 0) != (z < 0)) {
/* integer overflow */
SET_FLT_VALUE(regs[a], (mrb_float)x - (mrb_float)y);
break;
......
......@@ -96,7 +96,7 @@ all : $(EXE) $(MRUBY) $(TESTRB) $(TESTMRB)
@echo
# executable constructed using linker from object files
$(EXE) : $(OBJS) $(LIBR)
$(EXE) : $(OBJS) $(LIBR) $(GEM_ARCHIVE_FILES)
$(LL) -o $@ $(LDFLAGS) $(OBJS) $(LIBR) $(GEM_ARCHIVE_FILES) $(LIBS)
-include $(OBJS:.o=.d)
......
......@@ -66,7 +66,7 @@ endif
all : $(LIBR) $(EXE)
# executable constructed using linker from object files
$(EXE) : $(LIBR) $(OBJS) $(EXTS)
$(EXE) : $(LIBR) $(OBJS) $(GEM_ARCHIVE_FILES) $(EXTS)
$(LL) -o $@ $(LDFLAGS) $(OBJS) $(LIBR) $(GEM_ARCHIVE_FILES) $(EXTS) $(LIBS)
-include $(OBJS:.o=.d)
......
......@@ -71,7 +71,7 @@ endif
all : $(LIBR) $(EXE)
# executable constructed using linker from object files
$(EXE) : $(LIBR) $(OBJS) $(EXTS)
$(EXE) : $(LIBR) $(OBJS) $(GEM_ARCHIVE_FILES) $(EXTS)
$(LL) -o $@ $(LDFLAGS) $(OBJS) $(LIBR) $(GEM_ARCHIVE_FILES) $(EXTS) $(LIBS)
-include $(OBJS:.o=.d)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment