Skip to content

Commit

Permalink
Fix return value type of bytecode_decoder
Browse files Browse the repository at this point in the history
  • Loading branch information
kaz0505 committed Sep 20, 2016
1 parent 968ebac commit cb29c9b
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion include/mruby.h
Original file line number Diff line number Diff line change
Expand Up @@ -177,7 +177,7 @@ typedef struct mrb_state {
#endif

#ifdef MRB_BYTECODE_DECODE_OPTION
void (*bytecode_decoder)(struct mrb_state* mrb, mrb_code *code);
mrb_code (*bytecode_decoder)(struct mrb_state* mrb, mrb_code code);
#endif

struct RClass *eException_class;
Expand Down
4 changes: 2 additions & 2 deletions src/vm.c
Original file line number Diff line number Diff line change
Expand Up @@ -720,9 +720,9 @@ argnum_error(mrb_state *mrb, mrb_int num)
#endif

#ifdef MRB_BYTECODE_DECODE_OPTION
#define BYTECODE_DECODER(x) if( (mrb)->bytecode_decoder ) (mrb)->bytecode_decoder((mrb), (x))
#define BYTECODE_DECODER(x) ((mrb)->bytecode_decoder)?(mrb)->bytecode_decoder((mrb), (x)):(x)
#else
#define BYTECODE_DECODER(x) (x);
#define BYTECODE_DECODER(x) (x)
#endif


Expand Down

0 comments on commit cb29c9b

Please sign in to comment.