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

tweak the logic for LoadLibraryEx() calls following ctypes #140

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

mattip
Copy link
Contributor

@mattip mattip commented Oct 29, 2024

From this comment

@arigo

Does it need any new test?

@arigo
Copy link
Contributor

arigo commented Oct 29, 2024

I'm not even absolutely sure about why the ctypes logic is that way or the exact behavior that it implies. As far as I can tell the code here is doing the same thing, but not sure I can write relevant tests.

@arigo
Copy link
Contributor

arigo commented Oct 29, 2024

We can write a comment for the whatsnew and/or the documentation: when ffi.dlopen(filename, flags) is called on Windows with flags equal to zero or omitted, then:

  1. cffi automatically provides some reasonable flags to LoadLibraryEx();
  2. if filename has got a path, but a relative one, then it is replaced with an absolute path.

If needed, you can avoid all this by giving an explicit non-zero flags.

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