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

Another batch of c++ preparation trivia #3027

Merged
merged 10 commits into from
Apr 9, 2024

Conversation

pmatilai
Copy link
Member

@pmatilai pmatilai commented Apr 8, 2024

No description provided.

C lets us do this but in C++ needs to run destructors at end of scope,
so they better be properly initialized...

These are all over the place but so trivial putting them to different
commits doesn't make much sense.
The internal db interface expects rpmRC returns, C doesn't mind but
C++ does so update those parts to pull the real rpmRC enum, update
return code variable types to match.
Upstream Lua headers lack C++ guards, argh. Lump them all into rpmlua.h
and deal with it centrally there. In the past we've avoided including
Lua there but now that Lua is mandatory it doesn't cause other issues.
rpmlogCallbackData is already a pointer type, we don't want a pointer
to a pointer for this. Kinda surprising it actually worked, but then
it's just a void pointer so...
rpmTagType can include information about the return type
besides just the tag, so a strict enum wont do.
Static variables are initialized by the compiler, simply dropping
this allows us to avoid the int/enum mismatch from initializing
hash algo to an invalid 0.
@pmatilai pmatilai merged commit 62f7e75 into rpm-software-management:master Apr 9, 2024
1 check passed
@pmatilai pmatilai deleted the cxxnits branch April 9, 2024 05:16
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

1 participant