tweak the logic for LoadLibraryEx() calls following ctypes by mattip · Pull Request #140 · python-cffi/cffi · GitHub
Skip to content

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

Open
mattip wants to merge 1 commit intopython-cffi:mainfrom
mattip:windows-abs-path
Open

tweak the logic for LoadLibraryEx() calls following ctypes#140
mattip wants to merge 1 commit intopython-cffi:mainfrom
mattip:windows-abs-path

Conversation

@mattip
Copy link
Copy Markdown
Contributor

@mattip mattip commented Oct 29, 2024

From this comment

@arigo

Does it need any new test?

@arigo
Copy link
Copy Markdown
Contributor

arigo commented Oct 29, 2024

@arigo
Copy link
Copy Markdown
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.

@arigo
Copy link
Copy Markdown
Contributor

arigo commented Dec 21, 2024

Is there still something to do here?

@nitzmahone nitzmahone self-requested a review June 11, 2025 22:54
@mattip
Copy link
Copy Markdown
Contributor Author

mattip commented Jun 25, 2025

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