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

Avoid using types from Lua includes in rpmlua.h again #893

Merged
merged 1 commit into from
Oct 10, 2019

Conversation

pmatilai
Copy link
Member

rpmlua.h was originally written in a way that allows it to be included
regardless of whether Lua is actually enabled in rpm or not, or where
Lua headers are, specifically to isolate the rest of rpm from these
details. That was changed in commit 62bd622
when <lauxlib.h> started getting included in rpmlua.h, which leaks to
places like librpmbuild which do not directly use Lua.

The way Lua typedef's the luaL_Reg struct to itself defies my C fu for
for handling this in some nicer typesafe way, fix this all by just using
a void pointer instead, this is just an internal API where buyer can be
expected to beware.

Fixes #888

rpmlua.h was originally written in a way that allows it to be included
regardless of whether Lua is actually enabled in rpm or not, or where
Lua headers are, specifically to isolate the rest of rpm from these
details. That was changed in commit 62bd622
when <lauxlib.h> started getting included in rpmlua.h, which leaks to
places like librpmbuild which do not directly use Lua.

The way Lua typedef's the luaL_Reg struct to itself defies my C fu for
for handling this in some nicer typesafe way, fix this all by just using
a void pointer instead, this is just an internal API where buyer can be
expected to beware.

Fixes rpm-software-management#888
@pmatilai
Copy link
Member Author

As per #888 (comment)...

@pmatilai pmatilai merged commit facee2c into rpm-software-management:master Oct 10, 2019
@pmatilai pmatilai deleted the luabuild-pr branch October 18, 2019 11:41
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug build Build-system related
Projects
None yet
Development

Successfully merging this pull request may close these issues.

../rpmio/rpmlua.h:5:10: fatal error: lauxlib.h: No such file or directory
1 participant