Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

bufferedio.c uses unused argument of METH_NOARGS functions #78468

Closed
jdemeyer opened this issue Jul 31, 2018 · 2 comments
Closed

bufferedio.c uses unused argument of METH_NOARGS functions #78468

jdemeyer opened this issue Jul 31, 2018 · 2 comments
Labels
3.8 only security fixes extension-modules C modules in the Modules dir

Comments

@jdemeyer
Copy link
Contributor

BPO 34287
Nosy @rhettinger, @scoder, @methane, @jdemeyer
PRs
  • bpo-34287: do not use second argument of METH_NOARGS functions #8582
  • Note: these values reflect the state of the issue at the time it was migrated and might not reflect the current state.

    Show more details

    GitHub fields:

    assignee = None
    closed_at = <Date 2018-08-02.11:15:25.916>
    created_at = <Date 2018-07-31.07:07:43.732>
    labels = ['extension-modules', '3.8']
    title = 'bufferedio.c uses unused argument of METH_NOARGS functions'
    updated_at = <Date 2018-08-02.11:15:25.915>
    user = 'https://github.com/jdemeyer'

    bugs.python.org fields:

    activity = <Date 2018-08-02.11:15:25.915>
    actor = 'methane'
    assignee = 'none'
    closed = True
    closed_date = <Date 2018-08-02.11:15:25.916>
    closer = 'methane'
    components = ['Extension Modules']
    creation = <Date 2018-07-31.07:07:43.732>
    creator = 'jdemeyer'
    dependencies = []
    files = []
    hgrepos = []
    issue_num = 34287
    keywords = ['patch']
    message_count = 2.0
    messages = ['322736', '322945']
    nosy_count = 4.0
    nosy_names = ['rhettinger', 'scoder', 'methane', 'jdemeyer']
    pr_nums = ['8582']
    priority = 'normal'
    resolution = 'fixed'
    stage = 'resolved'
    status = 'closed'
    superseder = None
    type = None
    url = 'https://bugs.python.org/issue34287'
    versions = ['Python 3.8']

    @jdemeyer
    Copy link
    Contributor Author

    A METH_NOARGS function has a second unused argument which is always NULL (this is guaranteed by the documentation).

    However, some functions in Modules/_io/bufferedio.c actually that second NULL argument. This is technically not a bug, but it looks more clear to explicitly mark that second argument as unused.

    @jdemeyer jdemeyer added 3.8 only security fixes extension-modules C modules in the Modules dir labels Jul 31, 2018
    @methane
    Copy link
    Member

    methane commented Aug 2, 2018

    New changeset fc512e3 by INADA Naoki (jdemeyer) in branch 'master':
    bpo-34287: Do not use second argument of METH_NOARGS functions (GH-8582)
    fc512e3

    @methane methane closed this as completed Aug 2, 2018
    @ezio-melotti ezio-melotti transferred this issue from another repository Apr 10, 2022
    Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
    Labels
    3.8 only security fixes extension-modules C modules in the Modules dir
    Projects
    None yet
    Development

    No branches or pull requests

    2 participants