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
Boxiang Sun
cython
Commits
9ad73800
Commit
9ad73800
authored
Oct 12, 2013
by
Stefan Behnel
Browse files
Options
Browse Files
Download
Plain Diff
merge 0.19.x branch into master
parents
2f575a61
049a0fe9
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
13 additions
and
6 deletions
+13
-6
CHANGES.rst
CHANGES.rst
+7
-0
Cython/Includes/cpython/array.pxd
Cython/Includes/cpython/array.pxd
+6
-6
No files found.
CHANGES.rst
View file @
9ad73800
...
...
@@ -70,6 +70,13 @@ Features added
Bugs fixed
----------
* Some standard declarations were fixed or updated, including the previously
incorrect declaration of ``PyBuffer_FillInfo()`` and some missing bits in
``libc.math``.
* Heap allocated subtypes of ``type`` used the wrong base type struct at the
C level.
* Calling the unbound method dict.keys/value/items() in dict subtypes could
call the bound object method instead of the unbound supertype method.
...
...
Cython/Includes/cpython/array.pxd
View file @
9ad73800
...
...
@@ -122,9 +122,9 @@ cdef extern from *: # Hard-coded utility code hack.
# fast resize/realloc
# not suitable for small increments; reallocation 'to the point'
int
resize
(
array
self
,
Py_ssize_t
n
)
int
resize
(
array
self
,
Py_ssize_t
n
)
except
-
1
# efficient for small increments (not in Py2.3-)
int
resize_smart
(
array
self
,
Py_ssize_t
n
)
int
resize_smart
(
array
self
,
Py_ssize_t
n
)
except
-
1
cdef
inline
array
clone
(
array
template
,
Py_ssize_t
length
,
bint
zero
):
...
...
@@ -144,17 +144,17 @@ cdef inline array copy(array self):
memcpy
(
op
.
data
.
as_chars
,
self
.
data
.
as_chars
,
Py_SIZE
(
op
)
*
op
.
ob_descr
.
itemsize
)
return
op
cdef
inline
int
extend_buffer
(
array
self
,
char
*
stuff
,
Py_ssize_t
n
):
cdef
inline
int
extend_buffer
(
array
self
,
char
*
stuff
,
Py_ssize_t
n
)
except
-
1
:
""" efficent appending of new stuff of same type
(e.g. of same array type)
n: number of elements (not number of bytes!) """
cdef
Py_ssize_t
itemsize
=
self
.
ob_descr
.
itemsize
cdef
Py_ssize_t
orgsize
=
Py_SIZE
(
self
)
if
resize_smart
(
self
,
orgsize
+
n
)
==
-
1
:
return
-
1
resize_smart
(
self
,
orgsize
+
n
)
memcpy
(
self
.
data
.
as_chars
+
orgsize
*
itemsize
,
stuff
,
n
*
itemsize
)
return
0
cdef
inline
int
extend
(
array
self
,
array
other
)
except
-
2
:
cdef
inline
int
extend
(
array
self
,
array
other
)
except
-
1
:
""" extend array with data from another array; types must match. """
if
self
.
ob_descr
.
typecode
!=
other
.
ob_descr
.
typecode
:
PyErr_BadArgument
()
...
...
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