Commit f7c6d868 authored by Thomas Heller's avatar Thomas Heller

Use a unicode string as unique_key instead of 8-bit string.

parent a1884664
...@@ -22,7 +22,7 @@ assigned from Python must be kept. ...@@ -22,7 +22,7 @@ assigned from Python must be kept.
>>> array[4] = 'foo bar' >>> array[4] = 'foo bar'
>>> array._objects >>> array._objects
{s'4': b'foo bar'} {'4': b'foo bar'}
>>> array[4] >>> array[4]
s'foo bar' s'foo bar'
>>> >>>
...@@ -47,9 +47,9 @@ of 'x' ('_b_base_' is either None, or the root object owning the memory block): ...@@ -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.array[0] = 'spam spam spam'
>>> x._objects >>> x._objects
{s'0:2': b'spam spam spam'} {'0:2': b'spam spam spam'}
>>> x.array._b_base_._objects >>> x.array._b_base_._objects
{s'0:2': b'spam spam spam'} {'0:2': b'spam spam spam'}
>>> >>>
''' '''
......
...@@ -2027,7 +2027,7 @@ unique_key(CDataObject *target, Py_ssize_t index) ...@@ -2027,7 +2027,7 @@ unique_key(CDataObject *target, Py_ssize_t index)
#endif #endif
target = target->b_base; target = target->b_base;
} }
return PyString_FromStringAndSize(string, cp-string); return PyUnicode_FromStringAndSize(string, cp-string);
} }
/* /*
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment