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
4c02adc9
Commit
4c02adc9
authored
Aug 02, 2020
by
Stefan Behnel
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Do not depend on the default type inference in "cpython/array.pxd".
parent
343262ae
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
2 additions
and
2 deletions
+2
-2
Cython/Includes/cpython/array.pxd
Cython/Includes/cpython/array.pxd
+2
-2
No files found.
Cython/Includes/cpython/array.pxd
View file @
4c02adc9
...
...
@@ -131,14 +131,14 @@ cdef inline array clone(array template, Py_ssize_t length, bint zero):
""" fast creation of a new array, given a template array.
type will be same as template.
if zero is true, new array will be initialized with zeroes."""
op
=
newarrayobject
(
Py_TYPE
(
template
),
length
,
template
.
ob_descr
)
cdef
array
op
=
newarrayobject
(
Py_TYPE
(
template
),
length
,
template
.
ob_descr
)
if
zero
and
op
is
not
None
:
memset
(
op
.
data
.
as_chars
,
0
,
length
*
op
.
ob_descr
.
itemsize
)
return
op
cdef
inline
array
copy
(
array
self
):
""" make a copy of an array. """
op
=
newarrayobject
(
Py_TYPE
(
self
),
Py_SIZE
(
self
),
self
.
ob_descr
)
cdef
array
op
=
newarrayobject
(
Py_TYPE
(
self
),
Py_SIZE
(
self
),
self
.
ob_descr
)
memcpy
(
op
.
data
.
as_chars
,
self
.
data
.
as_chars
,
Py_SIZE
(
op
)
*
op
.
ob_descr
.
itemsize
)
return
op
...
...
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