-
Notifications
You must be signed in to change notification settings - Fork 1.2k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
2 changed files
with
31 additions
and
4 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
From 3af3a6955414f20dc711991468cbf5dc232908fc Mon Sep 17 00:00:00 2001 | ||
From: Armin Rigo <[email protected]> | ||
Date: Wed, 26 Jun 2024 18:10:49 +0200 | ||
Subject: [PATCH] PyUnicode_AsWideChar takes a 'PyObject *' argument | ||
|
||
--- | ||
src/c/_cffi_backend.c | 2 +- | ||
1 file changed, 1 insertion(+), 1 deletion(-) | ||
|
||
diff --git a/src/c/_cffi_backend.c b/src/c/_cffi_backend.c | ||
index 602117e3..7b288ef2 100644 | ||
--- a/src/c/_cffi_backend.c | ||
+++ b/src/c/_cffi_backend.c | ||
@@ -4565,7 +4565,7 @@ static void *b_do_dlopen(PyObject *args, const char **p_printable_filename, | ||
sz1 = PyText_GetSize(filename_unicode) + 1; | ||
sz1 *= 2; /* should not be needed, but you never know */ | ||
w1 = alloca(sizeof(wchar_t) * sz1); | ||
- sz1 = PyUnicode_AsWideChar((PyUnicodeObject *)filename_unicode, | ||
+ sz1 = PyUnicode_AsWideChar(filename_unicode, | ||
w1, sz1 - 1); | ||
if (sz1 < 0) | ||
return NULL; |