mirror of
https://github.com/mruby/mruby
synced 2026-06-08 16:11:16 +00:00
Merge branch 'master' into use_ruby_for_building
This commit is contained in:
@@ -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"
|
||||
|
||||
+2
-2
@@ -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;
|
||||
|
||||
+1
-1
@@ -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)
|
||||
|
||||
+1
-1
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user