Skip to content

Commit

Permalink
cdef bytes, then cast to wchar_t
Browse files Browse the repository at this point in the history
  • Loading branch information
ChrisBarker-NOAA committed Mar 12, 2024
1 parent f2e6b09 commit 798e86a
Showing 1 changed file with 0 additions and 4 deletions.
4 changes: 0 additions & 4 deletions py_gd/py_gd.pyx
Original file line number Diff line number Diff line change
Expand Up @@ -78,11 +78,7 @@ cdef FILE* open_file(file_path) except *:

IF UNAME_SYSNAME == 'Windows':
cdef bytes bytes_flag = "wb".encode('utf-16')
cdef char* char_flag = bytes_flag

cdef bytes bytes_filepath = file_path.encode('utf-16')
# cdef char* char_filename = bytes_filepath

fp = _wfopen(<wchar_t*> char_filename, <wchar_t*> char_flag)
ELSE:
cdef bytes bytes_flag = "wb".encode('ascii')
Expand Down

0 comments on commit 798e86a

Please sign in to comment.