Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
C
cpython
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
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Kirill Smelkov
cpython
Commits
f7c6d868
Commit
f7c6d868
authored
Jul 12, 2007
by
Thomas Heller
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Use a unicode string as unique_key instead of 8-bit string.
parent
a1884664
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
4 additions
and
4 deletions
+4
-4
Lib/ctypes/test/test_objects.py
Lib/ctypes/test/test_objects.py
+3
-3
Modules/_ctypes/_ctypes.c
Modules/_ctypes/_ctypes.c
+1
-1
No files found.
Lib/ctypes/test/test_objects.py
View file @
f7c6d868
...
...
@@ -22,7 +22,7 @@ assigned from Python must be kept.
>>> array[4] = 'foo bar'
>>> array._objects
{
s
'4': b'foo bar'}
{'4': b'foo bar'}
>>> array[4]
s'foo bar'
>>>
...
...
@@ -47,9 +47,9 @@ of 'x' ('_b_base_' is either None, or the root object owning the memory block):
>>> x.array[0] = 'spam spam spam'
>>> x._objects
{
s
'0:2': b'spam spam spam'}
{'0:2': b'spam spam spam'}
>>> x.array._b_base_._objects
{
s
'0:2': b'spam spam spam'}
{'0:2': b'spam spam spam'}
>>>
'''
...
...
Modules/_ctypes/_ctypes.c
View file @
f7c6d868
...
...
@@ -2027,7 +2027,7 @@ unique_key(CDataObject *target, Py_ssize_t index)
#endif
target
=
target
->
b_base
;
}
return
Py
String
_FromStringAndSize
(
string
,
cp
-
string
);
return
Py
Unicode
_FromStringAndSize
(
string
,
cp
-
string
);
}
/*
...
...
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