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
822df280
Commit
822df280
authored
Jun 29, 2018
by
gabrieldemarmiesse
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Docs: Removed mention of some versions so old that nobody should care.
parent
084a25f5
Changes
8
Hide whitespace changes
Inline
Side-by-side
Showing
8 changed files
with
10 additions
and
10 deletions
+10
-10
docs/src/tutorial/clibraries.rst
docs/src/tutorial/clibraries.rst
+1
-1
docs/src/tutorial/cython_tutorial.rst
docs/src/tutorial/cython_tutorial.rst
+1
-1
docs/src/tutorial/external.rst
docs/src/tutorial/external.rst
+1
-1
docs/src/tutorial/pure.rst
docs/src/tutorial/pure.rst
+1
-1
docs/src/tutorial/strings.rst
docs/src/tutorial/strings.rst
+3
-3
docs/src/userguide/extension_types.rst
docs/src/userguide/extension_types.rst
+1
-1
docs/src/userguide/pypy.rst
docs/src/userguide/pypy.rst
+1
-1
docs/src/userguide/wrapping_CPlusPlus.rst
docs/src/userguide/wrapping_CPlusPlus.rst
+1
-1
No files found.
docs/src/tutorial/clibraries.rst
View file @
822df280
...
...
@@ -158,7 +158,7 @@ We can thus change the init function as follows:
exception
instance
in
order
to
raise
it
may
actually
fail
because
we
are
running
out
of
memory
.
Luckily
,
CPython
provides
a
C
-
API
function
``
PyErr_NoMemory
()``
that
safely
raises
the
right
exception
for
us
.
Since
version
0.14.1
,
Cython
automatically
exception
for
us
.
Cython
automatically
substitutes
this
C
-
API
call
whenever
you
write
``
raise
MemoryError
``
or
``
raise
MemoryError
()``.
If
you
use
an
older
version
,
you
have
to
cimport
the
C
-
API
function
from
the
standard
...
...
docs/src/tutorial/cython_tutorial.rst
View file @
822df280
...
...
@@ -77,7 +77,7 @@ It is shipped and installed with Cython and can be used like this::
>>> import helloworld
Hello World
Since Cython 0.11, t
he :ref:`Pyximport<pyximport>` module also has experimental
T
he :ref:`Pyximport<pyximport>` module also has experimental
compilation support for normal Python modules. This allows you to
automatically run Cython on every .pyx and .py module that Python
imports, including the standard library and installed packages.
...
...
docs/src/tutorial/external.rst
View file @
822df280
...
...
@@ -92,7 +92,7 @@ names like this::
char* strstr(const char*, const char*)
However, this prevents Cython code from calling it with keyword
arguments
(supported since Cython 0.19)
. It is therefore preferable
arguments. It is therefore preferable
to write the declaration like this instead:
.. literalinclude:: ../../examples/tutorial/external/keyword_args.pyx
...
...
docs/src/tutorial/pure.rst
View file @
822df280
...
...
@@ -334,7 +334,7 @@ to make the names match again.
Using C arrays for fixed size lists
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
Since Cython 0.22,
C arrays can automatically coerce to Python lists or tuples.
C arrays can automatically coerce to Python lists or tuples.
This can be exploited to replace fixed size Python lists in Python code by C
arrays when compiled. An example:
...
...
docs/src/tutorial/strings.rst
View file @
822df280
...
...
@@ -260,7 +260,7 @@ not modify a string they return, for example:
.. literalinclude:: ../../examples/tutorial/string/someheader.h
Since version 0.18,
Cython has support for the ``const`` modifier in
Cython has support for the ``const`` modifier in
the language, so you can declare the above functions straight away as
follows:
...
...
@@ -296,7 +296,7 @@ bytes most of which tend to be 0.
Again, no bounds checking is done if slice indices are provided, so
incorrect indices lead to data corruption and crashes. However, using
negative indices is possible
since Cython 0.17
and will inject a call
negative indices is possible and will inject a call
to :c:func:`strlen()` in order to determine the string length.
Obviously, this only works for 0-terminated strings without internal
null bytes. Text encoded in UTF-8 or one of the ISO-8859 encodings is
...
...
@@ -475,7 +475,7 @@ Single bytes and characters
The Python C-API uses the normal C :c:type:`char` type to represent
a byte value, but it has two special integer types for a Unicode code
point value, i.e. a single Unicode character: :c:type:`Py_UNICODE`
and :c:type:`Py_UCS4`.
Since version 0.13,
Cython supports the
and :c:type:`Py_UCS4`. Cython supports the
first natively, support for :c:type:`Py_UCS4` is new in Cython 0.15.
:c:type:`Py_UNICODE` is either defined as an unsigned 2-byte or
4-byte integer, or as :c:type:`wchar_t`, depending on the platform.
...
...
docs/src/userguide/extension_types.rst
View file @
822df280
...
...
@@ -347,7 +347,7 @@ inherit from multiple extension types provided that the usual Python rules for
multiple inheritance are followed (i.e. the C layouts of all the base classes
must be compatible).
Since Cython 0.13.1, t
here is a way to prevent extension types from
T
here is a way to prevent extension types from
being subtyped in Python. This is done via the ``final`` directive,
usually set on an extension type using a decorator::
...
...
docs/src/userguide/pypy.rst
View file @
822df280
Porting Cython code to PyPy
===========================
Since version 0.17,
Cython has basic support for cpyext, the layer in
Cython has basic support for cpyext, the layer in
`PyPy <http://pypy.org/>`_ that emulates CPython's C-API. This is
achieved by making the generated C code adapt at C compile time, so
the generated code will compile in both CPython and PyPy unchanged.
...
...
docs/src/userguide/wrapping_CPlusPlus.rst
View file @
822df280
...
...
@@ -371,7 +371,7 @@ For example::
The pxd files in ``/Cython/Includes/libcpp`` also work as good examples on
how to declare C++ classes.
Since Cython 0.17, t
he STL containers coerce from and to the
T
he STL containers coerce from and to the
corresponding Python builtin types. The conversion is triggered
either by an assignment to a typed variable (including typed function
arguments) or by an explicit cast, e.g.::
...
...
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