Skip to content
This repository has been archived by the owner on Jul 1, 2024. It is now read-only.

util/library: Allow loading of obs_module_t #1033

Merged
merged 1 commit into from
Mar 10, 2023
Merged

Conversation

Xaymar
Copy link
Owner

@Xaymar Xaymar commented Mar 10, 2023

Explain the Pull Request

Allows passing an obs_module_t to util::library::load in order to use a libOBS module as a library for functions. Aids in implementing other features, such as browser source widgets.

Completion Checklist

  • This has been tested on the following platforms:
    • MacOS 10.15
    • MacOS 11
    • MacOS 12
    • Ubuntu 20.04
    • Ubuntu 22.04
    • Windows 10
    • Windows 11
  • The copyright headers and license files have been updated.
  • I will maintain this for the forseeable future, and have added myself to CODEOWNERS.

@Xaymar Xaymar force-pushed the patch/util-library-module branch 3 times, most recently from f49134c to 17aac7d Compare March 10, 2023 18:19
Allows us to pass an obs_module_t into util::library::load() for cleaner code. This requires an additional flag so we don't unload a module that is still in use by libOBS.
@Xaymar Xaymar marked this pull request as ready for review March 10, 2023 18:39
@Xaymar
Copy link
Owner Author

Xaymar commented Mar 10, 2023

Apparently AppleClang has a definition for std::filesystem::path that initializes with void*, void, resulting in the previous code failing to compile, despite being correct according to the standard. No idea what void*, void could even be, but replacing the constructor with an obs_module_t* one should work the same.

For future people, the error is a generic cannot form a reference to 'void'. Just check that whatever you pass void* to doesn't have a magic constructor that is added by a compiler.

@Xaymar Xaymar merged commit c7bc87d into root Mar 10, 2023
@Xaymar Xaymar deleted the patch/util-library-module branch March 10, 2023 18:42
@Xaymar Xaymar added this to the 0.12 milestone Mar 18, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

1 participant