File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 3333 static ModInfo modinfoLocal (#_guid, #_name, #_version, #_author); \
3434 ModInfo* modinfo = &modinfoLocal; \
3535 extern " C" JNIEXPORT ModInfo* __GetModInfo () { return modinfo; } \
36- IAML* aml = (IAML*)GetInterface(" AMLInterface" );
36+ IAML* aml = NULL ; \
37+ struct AMLInitStub { \
38+ AMLInitStub () { \
39+ aml = (IAML*)GetInterface (" AMLInterface" ); \
40+ } \
41+ }; AMLInitStub amlStub __attribute__ ((init_priority(101 ))); // Highest init prio
3742
3843#define MYMODCFG (_guid, _name, _version, _author ) \
3944 MYMOD (_guid, _name, _version, _author); \
Original file line number Diff line number Diff line change 3333 static ModInfo modinfoLocal (#_guid, #_name, #_version, #_author); \
3434 ModInfo* modinfo = &modinfoLocal; \
3535 extern " C" JNIEXPORT ModInfo* __GetModInfo () { return modinfo; } \
36- IAML* aml = (IAML*)GetInterface(" AMLInterface" );
36+ IAML* aml = NULL ; \
37+ struct AMLInitStub { \
38+ AMLInitStub () { \
39+ aml = (IAML*)GetInterface (" AMLInterface" ); \
40+ } \
41+ }; AMLInitStub amlStub __attribute__ ((init_priority(101 ))); // Highest init prio
3742
3843#define MYMODCFG (_guid, _name, _version, _author ) \
3944 MYMOD (_guid, _name, _version, _author); \
You can’t perform that action at this time.
0 commit comments