[docs] [issue14190] Minor C API documentation bugs

Baruch Sterin report at bugs.python.org
Sun Mar 4 07:07:08 CET 2012

New submission from Baruch Sterin <python at bsterin.com>:

The following functions are documented, but do not exist in the code:

* PyCodec_KnownEncoding
* PyRun_SimpleFileFlags

The following function is documented and exists in the code, but is not exposed through any of the header files:


The prototype in the documentation is incorrect:

* PyOS_stricmp returns int, not char*
* PyOS_strnicmp returns int, not char*
* PyCode_GetNumFree accepts a PyCodeObject* not PyObject*
* PyCode_NewEmpty returns a PyCodeObject* not PyObject*
* PyFile_SetBufSize accepts a PyObject*, not PyCodeObject
* PyGILState_GetThisThreadState returns PyThreadState* not PyThreadState
* PyUnicode_EncodeRawUnicodeEscape accepts 2, not 3 arguments
* PyUnicode_RichCompare returns PyObject*, not int
* PyType_IS_GC needs a PyTypeObject*, not PyObject*
* PyType_HasFeature needs a PyTypeObject*, not PyObject*

In addition, PyLong_FromSsize_t and PyLong_FromSsize_t are documented twice in long.html.

assignee: docs at python
components: Documentation
messages: 154879
nosy: baruch.sterin, docs at python
priority: normal
severity: normal
status: open
title: Minor C API documentation bugs
type: behavior
versions: Python 2.7

Python tracker <report at bugs.python.org>

More information about the docs mailing list