Skip to content

bpo-33012: Fix invalid function casts for long_long. - #6652

Merged
serhiy-storchaka merged 2 commits into
python:masterfrom
serhiy-storchaka:long_long-signature
Apr 30, 2018
Merged

bpo-33012: Fix invalid function casts for long_long.#6652
serhiy-storchaka merged 2 commits into
python:masterfrom
serhiy-storchaka:long_long-signature

Conversation

@serhiy-storchaka

@serhiy-storchaka serhiy-storchaka commented Apr 30, 2018

Copy link
Copy Markdown
Member

long_long() was used with three function types:
PyCFunction, getter and unaryfunction.

https://bugs.python.org/issue33012

long_long() was used with three function types:
PyCFunction, getter and unaryfunction.
Comment thread Objects/longobject.c Outdated
long_long_getter(PyObject *self, void *Py_UNUSED(ignored))
{
return long_long(self);
}

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What is the purpose of long_long_getter? Why not using long_long_meth?

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Avoid using the cast to getter.

@serhiy-storchaka
serhiy-storchaka merged commit 6405fee into python:master Apr 30, 2018
@serhiy-storchaka
serhiy-storchaka deleted the long_long-signature branch April 30, 2018 12:35
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

skip news type-bug An unexpected behavior, bug, or error

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants