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
Gwenaël Samain
cython
Commits
8e29c86c
Commit
8e29c86c
authored
May 04, 2014
by
Stefan Behnel
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
tighten return type declarations of some C-API functions
parent
cfbd88a2
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
10 additions
and
10 deletions
+10
-10
Cython/Includes/cpython/dict.pxd
Cython/Includes/cpython/dict.pxd
+5
-5
Cython/Includes/cpython/list.pxd
Cython/Includes/cpython/list.pxd
+3
-3
Cython/Includes/cpython/unicode.pxd
Cython/Includes/cpython/unicode.pxd
+2
-2
No files found.
Cython/Includes/cpython/dict.pxd
View file @
8e29c86c
...
@@ -25,7 +25,7 @@ cdef extern from "Python.h":
...
@@ -25,7 +25,7 @@ cdef extern from "Python.h":
# Return true if p is a dict object, but not an instance of a
# Return true if p is a dict object, but not an instance of a
# subtype of the dict type.
# subtype of the dict type.
obje
ct
PyDict_New
()
di
ct
PyDict_New
()
# Return value: New reference.
# Return value: New reference.
# Return a new empty dictionary, or NULL on failure.
# Return a new empty dictionary, or NULL on failure.
...
@@ -43,7 +43,7 @@ cdef extern from "Python.h":
...
@@ -43,7 +43,7 @@ cdef extern from "Python.h":
# matches key, return 1, otherwise return 0. On error, return
# matches key, return 1, otherwise return 0. On error, return
# -1. This is equivalent to the Python expression "key in p".
# -1. This is equivalent to the Python expression "key in p".
obje
ct
PyDict_Copy
(
object
p
)
di
ct
PyDict_Copy
(
object
p
)
# Return value: New reference.
# Return value: New reference.
# Return a new dictionary that contains the same key-value pairs as p.
# Return a new dictionary that contains the same key-value pairs as p.
...
@@ -77,19 +77,19 @@ cdef extern from "Python.h":
...
@@ -77,19 +77,19 @@ cdef extern from "Python.h":
# This is the same as PyDict_GetItem(), but key is specified as a
# This is the same as PyDict_GetItem(), but key is specified as a
# char*, rather than a PyObject*.
# char*, rather than a PyObject*.
objec
t
PyDict_Items
(
object
p
)
lis
t
PyDict_Items
(
object
p
)
# Return value: New reference.
# Return value: New reference.
# Return a PyListObject containing all the items from the
# Return a PyListObject containing all the items from the
# dictionary, as in the dictionary method items() (see the Python
# dictionary, as in the dictionary method items() (see the Python
# Library Reference).
# Library Reference).
objec
t
PyDict_Keys
(
object
p
)
lis
t
PyDict_Keys
(
object
p
)
# Return value: New reference.
# Return value: New reference.
# Return a PyListObject containing all the keys from the
# Return a PyListObject containing all the keys from the
# dictionary, as in the dictionary method keys() (see the Python
# dictionary, as in the dictionary method keys() (see the Python
# Library Reference).
# Library Reference).
objec
t
PyDict_Values
(
object
p
)
lis
t
PyDict_Values
(
object
p
)
# Return value: New reference.
# Return value: New reference.
# Return a PyListObject containing all the values from the
# Return a PyListObject containing all the values from the
# dictionary p, as in the dictionary method values() (see the
# dictionary p, as in the dictionary method values() (see the
...
...
Cython/Includes/cpython/list.pxd
View file @
8e29c86c
...
@@ -5,7 +5,7 @@ cdef extern from "Python.h":
...
@@ -5,7 +5,7 @@ cdef extern from "Python.h":
############################################################################
############################################################################
# Lists
# Lists
############################################################################
############################################################################
objec
t
PyList_New
(
Py_ssize_t
len
)
lis
t
PyList_New
(
Py_ssize_t
len
)
# Return a new list of length len on success, or NULL on failure.
# Return a new list of length len on success, or NULL on failure.
#
#
# Note: If length is greater than zero, the returned list object's
# Note: If length is greater than zero, the returned list object's
...
@@ -64,7 +64,7 @@ cdef extern from "Python.h":
...
@@ -64,7 +64,7 @@ cdef extern from "Python.h":
# successful; return -1 and set an exception if
# successful; return -1 and set an exception if
# unsuccessful. Analogous to list.append(item).
# unsuccessful. Analogous to list.append(item).
objec
t
PyList_GetSlice
(
object
list
,
Py_ssize_t
low
,
Py_ssize_t
high
)
lis
t
PyList_GetSlice
(
object
list
,
Py_ssize_t
low
,
Py_ssize_t
high
)
# Return value: New reference.
# Return value: New reference.
# Return a list of the objects in list containing the objects
# Return a list of the objects in list containing the objects
# between low and high. Return NULL and set an exception if
# between low and high. Return NULL and set an exception if
...
@@ -84,7 +84,7 @@ cdef extern from "Python.h":
...
@@ -84,7 +84,7 @@ cdef extern from "Python.h":
# Reverse the items of list in place. Return 0 on success, -1 on
# Reverse the items of list in place. Return 0 on success, -1 on
# failure. This is the equivalent of "list.reverse()".
# failure. This is the equivalent of "list.reverse()".
object
PyList_AsTuple
(
object
list
)
tuple
PyList_AsTuple
(
object
list
)
# Return value: New reference.
# Return value: New reference.
# Return a new tuple object containing the contents of list;
# Return a new tuple object containing the contents of list;
# equivalent to "tuple(list)".
# equivalent to "tuple(list)".
...
...
Cython/Includes/cpython/unicode.pxd
View file @
8e29c86c
...
@@ -87,14 +87,14 @@ cdef extern from *:
...
@@ -87,14 +87,14 @@ cdef extern from *:
# not NULL, the return value might be a shared object. Therefore,
# not NULL, the return value might be a shared object. Therefore,
# modification of the resulting Unicode object is only allowed
# modification of the resulting Unicode object is only allowed
# when u is NULL.
# when u is NULL.
object
PyUnicode_FromUnicode
(
Py_UNICODE
*
u
,
Py_ssize_t
size
)
unicode
PyUnicode_FromUnicode
(
Py_UNICODE
*
u
,
Py_ssize_t
size
)
# Create a Unicode Object from the given Unicode code point ordinal.
# Create a Unicode Object from the given Unicode code point ordinal.
#
#
# The ordinal must be in range(0x10000) on narrow Python builds
# The ordinal must be in range(0x10000) on narrow Python builds
# (UCS2), and range(0x110000) on wide builds (UCS4). A ValueError
# (UCS2), and range(0x110000) on wide builds (UCS4). A ValueError
# is raised in case it is not.
# is raised in case it is not.
object
PyUnicode_FromOrdinal
(
int
ordinal
)
unicode
PyUnicode_FromOrdinal
(
int
ordinal
)
# Return a read-only pointer to the Unicode object's internal
# Return a read-only pointer to the Unicode object's internal
# Py_UNICODE buffer, NULL if unicode is not a Unicode object.
# Py_UNICODE buffer, NULL if unicode is not a Unicode object.
...
...
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