Skip to content

Enhance extension loading#132

Merged
X39 merged 2 commits intoSQFvm:masterfrom
dextercd:master
Nov 18, 2020
Merged

Enhance extension loading#132
X39 merged 2 commits intoSQFvm:masterfrom
dextercd:master

Conversation

@dextercd
Copy link
Copy Markdown
Contributor

This PR fixes an issue with loading extensions on Linux and loads '_x64' extensions when the project has been compiled for 64 bits.

The code checks whether or not the library has already been loaded by
looking at the path() of every loaded dlops object.

For Linux ".so" is appended before loading the library, but this is not
appended when checking whether it's loaded. This causes the library to
get added to the dlops list multiple times.

This patch fixes the issue by introducing a new variable that has the
required platform dependent suffix and uses that for the comparisons and
loading.

The `name` variable stays unchanged so that the logging messages uses
the extension name as it appears in sqf.
@X39
Copy link
Copy Markdown
Collaborator

X39 commented Nov 18, 2020

I am not sure how this slipped through my inbox ...

@X39 X39 merged commit 5c15ac0 into SQFvm:master Nov 18, 2020
@dextercd
Copy link
Copy Markdown
Contributor Author

No worries. Thank you for merging

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.

2 participants