Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add missing MRB_API #3215

Closed
wants to merge 1 commit into from
Closed

Add missing MRB_API #3215

wants to merge 1 commit into from

Conversation

kou
Copy link
Contributor

@kou kou commented Sep 23, 2016

MRB_API is used implementation in load.c:

MRB_API mrb_irep*
mrb_read_irep_file(mrb_state *mrb, FILE* fp)

MRB_API is used implementation in load.c:

    MRB_API mrb_irep*
    mrb_read_irep_file(mrb_state *mrb, FILE* fp)
@matz
Copy link
Member

@matz matz commented Sep 23, 2016

I considered mrb_read_irep_file() to be an internal function. Do you have any use-case of the function?

@kou
Copy link
Contributor Author

@kou kou commented Sep 23, 2016

I don't have any use-case. I just want to build (link) error.
Could you remove MRB_API in load.c?

@kou kou closed this Sep 23, 2016
@kou
Copy link
Contributor Author

@kou kou commented Sep 23, 2016

I just want to "fix" build (link) error...

@matz
Copy link
Member

@matz matz commented Sep 23, 2016

I see inconsistency. Will fix.

kou added a commit to kou/mruby that referenced this issue Sep 25, 2016
ref mruby#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
@kou kou mentioned this pull request Sep 25, 2016
@kou kou deleted the add-missing-mrb-api branch Sep 25, 2016
@kou
Copy link
Contributor Author

@kou kou commented Sep 25, 2016

Thanks. But I found more same cases. I created a new pull request as #3216.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants