Skip to content

Commit 88c224c

Browse files
cast to char* before casting to wchar_t
1 parent 2cbb60a commit 88c224c

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

py_gd/py_gd.pyx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -79,7 +79,7 @@ cdef FILE* open_file(file_path) except *:
7979
IF UNAME_SYSNAME == 'Windows':
8080
cdef bytes bytes_flag = "wb".encode('utf-16')
8181
cdef bytes bytes_filepath = file_path.encode('utf-16')
82-
fp = _wfopen(<wchar_t*> bytes_filepath, <wchar_t*> bytes_flag)
82+
fp = _wfopen(<wchar_t*><char*>bytes_filepath, <wchar_t*><char*>bytes_flag)
8383
ELSE:
8484
cdef bytes bytes_flag = "wb".encode('ascii')
8585
fp = fopen(file_path.encode('utf-8'), bytes_flag)

0 commit comments

Comments
 (0)