Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
C
cpython
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
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Kirill Smelkov
cpython
Commits
db6c7f5c
Commit
db6c7f5c
authored
Oct 07, 2011
by
Georg Brandl
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Update C API docs for PEP 393.
parent
59de0ee9
Changes
4
Expand all
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
514 additions
and
100 deletions
+514
-100
Doc/c-api/long.rst
Doc/c-api/long.rst
+14
-0
Doc/c-api/module.rst
Doc/c-api/module.rst
+1
-1
Doc/c-api/unicode.rst
Doc/c-api/unicode.rst
+498
-98
Include/unicodeobject.h
Include/unicodeobject.h
+1
-1
No files found.
Doc/c-api/long.rst
View file @
db6c7f5c
...
...
@@ -100,6 +100,20 @@ All integers are implemented as "long" integer objects of arbitrary size.
string is first encoded to a byte string using :c:func:`PyUnicode_EncodeDecimal`
and then converted using :c:func:`PyLong_FromString`.
.. deprecated-removed:: 3.3 4.0
Part of the old-style :c:type:`Py_UNICODE` API; please migrate to using
:c:func:`PyLong_FromUnicodeObject`.
.. c:function:: PyObject* PyLong_FromUnicodeObject(PyObject *u, int base)
Convert a sequence of Unicode digits in the string *u* to a Python integer
value. The Unicode string is first encoded to a byte string using
:c:func:`PyUnicode_EncodeDecimal` and then converted using
:c:func:`PyLong_FromString`.
.. versionadded:: 3.3
.. c:function:: PyObject* PyLong_FromVoidPtr(void *p)
...
...
Doc/c-api/module.rst
View file @
db6c7f5c
...
...
@@ -87,7 +87,7 @@ There are only a few functions special to module objects.
Return the name of the file from which *module* was loaded using *module*'s
:attr:`__file__` attribute. If this is not defined, or if it is not a
unicode string, raise :exc:`SystemError` and return *NULL*; otherwise return
a reference to a
:c:type:`PyUnicodeObject`
.
a reference to a
Unicode object
.
.. versionadded:: 3.2
...
...
Doc/c-api/unicode.rst
View file @
db6c7f5c
This diff is collapsed.
Click to expand it.
Include/unicodeobject.h
View file @
db6c7f5c
...
...
@@ -686,7 +686,7 @@ PyAPI_FUNC(PyObject*) PyUnicode_Substring(
Py_ssize_t
start
,
Py_ssize_t
end
);
/* Copy the string into a UCS4 buffer including the null character i
s
copy_null
/* Copy the string into a UCS4 buffer including the null character i
f
copy_null
is set. Return NULL and raise an exception on error. Raise a ValueError if
the buffer is smaller than the string. Return buffer on success.
...
...
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