Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 2ea5893

Browse files
committed
Fix version number char* to str conversion
1 parent 8fc5d3b commit 2ea5893

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

dynd/config.pyx

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -15,10 +15,10 @@ cdef extern from 'git_version.hpp' namespace 'pydynd':
1515
# Expose the git hashes and version numbers of this build
1616
# NOTE: Cython generates code which is not const-correct, so
1717
# have to cast it away.
18-
_dynd_version_string = str(<char *>dynd_version_string)
19-
_dynd_git_sha1 = str(<char *>dynd_git_sha1)
20-
_dynd_python_version_string = str(<char *>dynd_python_version_string)
21-
_dynd_python_git_sha1 = str(<char *>dynd_python_git_sha1)
18+
_dynd_version_string = bytes(<char *>dynd_version_string).decode('ascii')
19+
_dynd_git_sha1 = bytes(<char *>dynd_git_sha1).decode('ascii')
20+
_dynd_python_version_string = bytes(<char *>dynd_python_version_string).decode('ascii')
21+
_dynd_python_git_sha1 = bytes(<char *>dynd_python_git_sha1).decode('ascii')
2222

2323
# Exceptions to convert from C++
2424
class BroadcastError(Exception):

0 commit comments

Comments
 (0)