Skip to content

Commit 91bd3eb

Browse files
committed
Remove needless MRB_API
ref #3215 If a function (such as mrb_read_irep_file()) is declared without MRB_API in header file (such as include/mruby/dump.h), implementation of the function in source file (such as src/load.c) should also defined without MRB_API. If MRB_API is mismatch, Visual C++ reports link error with C2375 error code: https://msdn.microsoft.com/en-us/library/5k6kw95a.aspx
1 parent 7a382e8 commit 91bd3eb

File tree

3 files changed

+3
-3
lines changed

3 files changed

+3
-3
lines changed

src/load.c

+1-1
Original file line numberDiff line numberDiff line change
@@ -646,7 +646,7 @@ mrb_load_irep(mrb_state *mrb, const uint8_t *bin)
646646

647647
#ifndef MRB_DISABLE_STDIO
648648

649-
MRB_API mrb_irep*
649+
mrb_irep*
650650
mrb_read_irep_file(mrb_state *mrb, FILE* fp)
651651
{
652652
mrb_irep *irep = NULL;

src/proc.c

+1-1
Original file line numberDiff line numberDiff line change
@@ -135,7 +135,7 @@ mrb_proc_cfunc_env_get(mrb_state *mrb, mrb_int idx)
135135
return e->stack[idx];
136136
}
137137

138-
MRB_API void
138+
void
139139
mrb_proc_copy(struct RProc *a, struct RProc *b)
140140
{
141141
a->flags = b->flags;

src/string.c

+1-1
Original file line numberDiff line numberDiff line change
@@ -576,7 +576,7 @@ str_rindex(mrb_state *mrb, mrb_value str, mrb_value sub, mrb_int pos)
576576
}
577577
}
578578

579-
MRB_API mrb_int
579+
mrb_int
580580
mrb_str_strlen(mrb_state *mrb, struct RString *s)
581581
{
582582
mrb_int i, max = RSTR_LEN(s);

0 commit comments

Comments
 (0)