-
-
Notifications
You must be signed in to change notification settings - Fork 32.7k
Closed
Labels
docsDocumentation in the Doc dirDocumentation in the Doc dir
Description
According to the documentation (https://docs.python.org/3/c-api/float.html#c.PyFloat_Pack2), the signature of PyFloat_Pack{2,4,8}
is
int PyFloat_Pack2(double x, unsigned char *p, int le)
Note that the second parameter is of type unsigned char *
However, for the implementation, the type is actually char *
cpython/Include/cpython/floatobject.h
Line 21 in db20324
PyAPI_FUNC(int) PyFloat_Pack2(double x, char *p, int le); |
The commit message of 882d809, says "Replace the "unsigned char*" type with "char*" which is more common and easy to use". So the fix is to update the docs to use char *
as well.
Linked PRs
Metadata
Metadata
Assignees
Labels
docsDocumentation in the Doc dirDocumentation in the Doc dir
Projects
Status
Todo