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
Labels
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Commits
Open sidebar
nexedi
cython
Commits
309e3a2d
Commit
309e3a2d
authored
Aug 13, 2008
by
Robert Bradshaw
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Minor fixes for bufaccess.
parent
205ea59d
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
7 additions
and
5 deletions
+7
-5
Cython/Compiler/ParseTreeTransforms.py
Cython/Compiler/ParseTreeTransforms.py
+1
-1
Cython/Includes/python_ref.pxd
Cython/Includes/python_ref.pxd
+3
-1
tests/run/bufaccess.pyx
tests/run/bufaccess.pyx
+3
-3
No files found.
Cython/Compiler/ParseTreeTransforms.py
View file @
309e3a2d
...
...
@@ -359,7 +359,7 @@ class ResolveOptions(CythonTransform):
for
option
in
options
:
name
,
value
=
option
optdict
[
name
]
=
value
return
self
.
visit_with_options
(
node
,
opt
ions
)
return
self
.
visit_with_options
(
node
,
opt
dict
)
else
:
return
self
.
visit_Node
(
node
)
...
...
Cython/Includes/python_ref.pxd
View file @
309e3a2d
cdef
extern
from
"Python.h"
:
ctypedef
void
PyObject
ctypedef
void
PyTypeObject
ctypedef
struct
PyObject
:
Py_ssize_t
ob_refcnt
PyTypeObject
*
ob_type
ctypedef
struct
FILE
...
...
tests/run/bufaccess.pyx
View file @
309e3a2d
...
...
@@ -14,7 +14,7 @@ cimport python_buffer
cimport
stdio
cimport
cython
cimport
refcoun
t
from
python_ref
cimport
PyObjec
t
__test__
=
{}
setup_string
=
"""
...
...
@@ -719,7 +719,7 @@ def decref(*args):
for
item
in
args
:
Py_DECREF
(
item
)
def
get_refcount
(
x
):
return
refcount
.
CyTest_GetRefcount
(
x
)
return
(
<
PyObject
*>
x
).
ob_refcnt
@
testcase
def
printbuf_object
(
object
[
object
]
buf
,
shape
):
...
...
@@ -742,7 +742,7 @@ def printbuf_object(object[object] buf, shape):
"""
cdef
int
i
for
i
in
range
(
shape
[
0
]):
print
repr
(
buf
[
i
]),
refcount
.
CyTest_GetRefcount
(
buf
[
i
])
print
repr
(
buf
[
i
]),
(
<
PyObject
*>
buf
[
i
]).
ob_refcnt
@
testcase
def
assign_to_object
(
object
[
object
]
buf
,
int
idx
,
obj
):
...
...
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