Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions ctypeslib/codegen/codegenerator.py
Original file line number Diff line number Diff line change
Expand Up @@ -789,7 +789,7 @@ def __getattr__(self, _):
if cc == "stdcall":
self.need_WinLibraries()
if library._name not in self._stdcall_libraries:
_ = "_stdcall_libraries[%r] =%s ctypes.WinDLL(%r)" % (library._name, stub_comment, library._filepath)
_ = "_stdcall_libraries[%r] =%s ctypes.WinDLL(%r)" % (library._name, stub_comment, library._name)
print(_, file=self.imports)
self._stdcall_libraries[library._name] = None
return "_stdcall_libraries[%r]" % library._name
Expand All @@ -801,7 +801,7 @@ def __getattr__(self, _):
else:
global_flag = ""
if library._name not in self._c_libraries:
print("_libraries[%r] =%s ctypes.CDLL(%r%s)" % (library._name, stub_comment, library._filepath, global_flag),
print("_libraries[%r] =%s ctypes.CDLL(%r%s)" % (library._name, stub_comment, library._name, global_flag),
file=self.imports)
self._c_libraries[library._name] = None
return "_libraries[%r]" % library._name
Expand Down