Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
C
cython
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Kirill Smelkov
cython
Commits
5e9d7562
Commit
5e9d7562
authored
Nov 30, 2010
by
Mark Florisson
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Changed bytes object ob_sval cast to unsigned char * to prevent a RuntimeError with "Invalid cast"
parent
18024c4f
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
7 additions
and
3 deletions
+7
-3
Cython/Debugger/libcython.py
Cython/Debugger/libcython.py
+4
-1
Cython/Debugger/libpython.py
Cython/Debugger/libpython.py
+3
-2
No files found.
Cython/Debugger/libcython.py
View file @
5e9d7562
...
...
@@ -578,13 +578,16 @@ class CyCy(CythonCommand):
cy next
cy run
cy cont
cy finish
cy up
cy down
cy select
cy bt / cy backtrace
cy print
cy list
cy print
cy locals
cy globals
cy exec
"""
name
=
'cy'
...
...
Cython/Debugger/libpython.py
View file @
5e9d7562
...
...
@@ -48,6 +48,7 @@ from __future__ import with_statement
import
os
import
re
import
sys
import
struct
import
locale
import
atexit
import
warnings
...
...
@@ -1026,8 +1027,8 @@ class PyBytesObjectPtr(PyObjectPtr):
def
__str__
(
self
):
field_ob_size
=
self
.
field
(
'ob_size'
)
field_ob_sval
=
self
.
field
(
'ob_sval'
)
char_ptr
=
field_ob_sval
.
address
.
cast
(
_type_unsigned_char_ptr
)
return
''
.
join
([
chr
(
char_ptr
[
i
])
for
i
in
safe_range
(
field_ob_size
)]
)
return
''
.
join
(
struct
.
pack
(
'b'
,
field_ob_sval
[
i
])
for
i
in
safe_range
(
field_ob_size
)
)
def
proxyval
(
self
,
visited
):
return
str
(
self
)
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment