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

Unwanted 'const' in meta_api.h? #6

Open
APGRoboCop opened this issue Mar 1, 2018 · 3 comments
Open

Unwanted 'const' in meta_api.h? #6

APGRoboCop opened this issue Mar 1, 2018 · 3 comments

Comments

@APGRoboCop
Copy link

Is it just me or is that 'const' should be removed? It seems to not have it on the Metamod-P src version. When I removed those 'const' from meta_api.h starting in line 134, it appears to allow my compiler for GCC 4.8 work.

C_DLLEXPORT int Meta_Query(const char *interfaceVersion,
plugin_info_t **plinfo,
mutil_funcs_t *pMetaUtilFuncs);
typedef int (*META_QUERY_FN) (const char *interfaceVersion,
plugin_info_t **plinfo,
mutil_funcs_t *pMetaUtilFuncs);

@dvander
Copy link
Member

dvander commented Mar 3, 2018

Is this for a plugin? The docs say Meta_Query's signature should be non-const, but in the code it's internally consistent and the string really is const.

@APGRoboCop
Copy link
Author

APGRoboCop commented Mar 4, 2018 via email

@dvander
Copy link
Member

dvander commented Mar 4, 2018

We const-qualified these to avoid compiler warnings. You could try to get the same changes upstreamed to metamod-p. Since they are supposed to be ABI compatible it shouldn't matter, you can build your plugin against either.

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

No branches or pull requests

2 participants