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

Add GDALRegisterPlugin function to register a single plugin by name #8511

Merged
merged 4 commits into from
Oct 4, 2023
Merged

Add GDALRegisterPlugin function to register a single plugin by name #8511

merged 4 commits into from
Oct 4, 2023

Conversation

tbonfort
Copy link
Member

@tbonfort tbonfort commented Oct 3, 2023

This PR adds an exported CPLErr GDALRegisterPlugin(const char *name) function to
register a single plugin by name. Returns an error if either the plugin library
file was not found, or was found but did not contain a suitable plugin loading
function name, or if the plugin loading function CPLError'd.

Some of the plugin loading functionality has been copied over from
GDALDriverManager::AutoLoadDrivers() instead of being refactored into
a single function as I deemed the return-on-error behavior was too messy to
unify.

@tbonfort tbonfort marked this pull request as draft October 3, 2023 10:11
@coveralls
Copy link
Collaborator

coveralls commented Oct 3, 2023

Coverage Status

coverage: 67.683% (-0.002%) from 67.685% when pulling 9f3b10c on tbonfort:load-plugin-by-name into f0095ee on OSGeo:master.

gcore/gdaldrivermanager.cpp Outdated Show resolved Hide resolved
gcore/gdaldrivermanager.cpp Outdated Show resolved Hide resolved
gcore/gdaldrivermanager.cpp Outdated Show resolved Hide resolved
gcore/gdaldrivermanager.cpp Outdated Show resolved Hide resolved
gcore/gdaldrivermanager.cpp Outdated Show resolved Hide resolved
gcore/gdaldrivermanager.cpp Outdated Show resolved Hide resolved
gcore/gdaldrivermanager.cpp Outdated Show resolved Hide resolved
gcore/gdaldrivermanager.cpp Show resolved Hide resolved
frmts/gdalallregister.cpp Outdated Show resolved Hide resolved
tbonfort and others added 2 commits October 3, 2023 14:58
Co-authored-by: Even Rouault <even.rouault@spatialys.com>
Co-authored-by: Even Rouault <even.rouault@spatialys.com>
@tbonfort tbonfort marked this pull request as ready for review October 4, 2023 07:03
@rouault rouault added this to the 3.8.0 milestone Oct 4, 2023
@rouault rouault merged commit 534f1e8 into OSGeo:master Oct 4, 2023
30 checks passed
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.

3 participants