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

Extra null terminators in keyword arrays in sqlite module #83675

Closed
alexhenrie mannequin opened this issue Jan 30, 2020 · 2 comments
Closed

Extra null terminators in keyword arrays in sqlite module #83675

alexhenrie mannequin opened this issue Jan 30, 2020 · 2 comments
Labels
3.9 only security fixes stdlib Python modules in the Lib dir

Comments

@alexhenrie
Copy link
Mannequin

alexhenrie mannequin commented Jan 30, 2020

BPO 39494
Nosy @berkerpeksag, @alexhenrie
PRs
  • bpo-39494: Remove extra null terminators from kwlist variables #18267
  • 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 2020-01-30.04:13:32.219>
    created_at = <Date 2020-01-30.01:43:52.336>
    labels = ['library', '3.9']
    title = 'Extra null terminators in keyword arrays in sqlite module'
    updated_at = <Date 2020-01-30.04:13:32.218>
    user = 'https://github.com/alexhenrie'

    bugs.python.org fields:

    activity = <Date 2020-01-30.04:13:32.218>
    actor = 'berker.peksag'
    assignee = 'none'
    closed = True
    closed_date = <Date 2020-01-30.04:13:32.219>
    closer = 'berker.peksag'
    components = ['Library (Lib)']
    creation = <Date 2020-01-30.01:43:52.336>
    creator = 'alex.henrie'
    dependencies = []
    files = []
    hgrepos = []
    issue_num = 39494
    keywords = ['patch']
    message_count = 2.0
    messages = ['361001', '361007']
    nosy_count = 2.0
    nosy_names = ['berker.peksag', 'alex.henrie']
    pr_nums = ['18267']
    priority = 'normal'
    resolution = 'fixed'
    stage = 'resolved'
    status = 'closed'
    superseder = None
    type = None
    url = 'https://bugs.python.org/issue39494'
    versions = ['Python 3.9']

    @alexhenrie
    Copy link
    Mannequin Author

    alexhenrie mannequin commented Jan 30, 2020

    Modules/_sqlite/cursor.c currently has the following variable declaration:

        static char *kwlist[] = {"size", NULL, NULL};

    The second null terminator is unnecessary and detrimental in that it makes the code harder to read and understand.

    Modules/_sqlite/module.c has two additional kwlist variables with the same problem.

    @alexhenrie alexhenrie mannequin added performance Performance or resource usage 3.9 only security fixes stdlib Python modules in the Lib dir labels Jan 30, 2020
    @berkerpeksag
    Copy link
    Member

    New changeset 188bb5b by Alex Henrie in branch 'master':
    bpo-39494: Remove extra null terminators from kwlist vars (GH-18267)
    188bb5b

    @berkerpeksag berkerpeksag removed the performance Performance or resource usage label Jan 30, 2020
    @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.9 only security fixes stdlib Python modules in the Lib dir
    Projects
    None yet
    Development

    No branches or pull requests

    1 participant