-
-
Notifications
You must be signed in to change notification settings - Fork 263
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
Wrapped libraries refactor #1257
Conversation
#define PRE_INIT \ | ||
if(box64_nogtk) \ | ||
return -1; | ||
|
||
#define CUSTOM_INIT \ | ||
libname = lib->name; \ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this line about libname disapeared?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes, libname
is unused in the entire file.
@@ -20,7 +20,7 @@ | |||
#include "gtkclass.h" | |||
|
|||
const char* gtkx112Name = "libgtk-x11-2.0.so.0"; | |||
static char* libname = NULL; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this was here because it use to be able to load gtk-1 also. I guess this is obsolete and can be remove completly, especially on 64bits?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes. wrappedgdkx112.c
still requires it, but wrappedgtkx112.c
does not.
This PR refactors various common operations on wrapped libraries initialization/finalization:
getMy(lib)
inCUSTOM_INIT
andfreeMy()
inCUSTOM_FINI
, toggled by theHAS_MY
macro;SETALT
inCUSTOM_INIT
into theALTMY
macro;setNeededLibs(lib, n, ...)
inCUSTOM_INIT
, called with the correctn
using theNEEDED_LIBS
macro.