Skip to content

declare visit_validate in Py_DEBUG macro #82607

Closed

Description

@corona10
BPO 38426
Nosy @vstinner, @serhiy-storchaka, @corona10
PRs
  • bpo-38392: Only declare visit_validate() if Py_DEBUG is defined #16689
  • 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 = 'https://github.com/corona10'
    closed_at = <Date 2019-10-10.07:47:29.702>
    created_at = <Date 2019-10-10.05:31:15.113>
    labels = ['interpreter-core', 'type-feature', '3.9']
    title = 'declare visit_validate in Py_DEBUG macro'
    updated_at = <Date 2019-10-10.07:47:29.701>
    user = 'https://github.com/corona10'

    bugs.python.org fields:

    activity = <Date 2019-10-10.07:47:29.701>
    actor = 'vstinner'
    assignee = 'corona10'
    closed = True
    closed_date = <Date 2019-10-10.07:47:29.702>
    closer = 'vstinner'
    components = ['Interpreter Core']
    creation = <Date 2019-10-10.05:31:15.113>
    creator = 'corona10'
    dependencies = []
    files = []
    hgrepos = []
    issue_num = 38426
    keywords = ['patch']
    message_count = 4.0
    messages = ['354313', '354315', '354319', '354324']
    nosy_count = 3.0
    nosy_names = ['vstinner', 'serhiy.storchaka', 'corona10']
    pr_nums = ['16689']
    priority = 'normal'
    resolution = 'fixed'
    stage = 'resolved'
    status = 'closed'
    superseder = None
    type = 'enhancement'
    url = 'https://bugs.python.org/issue38426'
    versions = ['Python 3.9']

    Activity

    1. corona10 commented on Oct 10, 2019

      @corona10
      MemberAuthor

      I've got the warining like this.

      Modules/gcmodule.c:1925:1: warning: ‘visit_validate’ defined but not used [-Wunused-function]
      visit_validate(PyObject *op, void *parent_raw)

      This looks like only used in pydebug.
      I'd like to propose declaring this function only in #ifdef Py_DEBUG.

      My environment is
      CentOS Linux release 7.6.1810
      gcc (GCC) 4.8.5 20150623 (Red Hat 4.8.5-36)

    2. self-assigned this
      on Oct 10, 2019
    3. vstinner commented on Oct 10, 2019

      @vstinner
      Member

      I wrote PR 16689 to fix the warning. I added the function in bpo-38392.

    4. vstinner commented on Oct 10, 2019

      @vstinner
      Member

      New changeset a544773 by Victor Stinner in branch 'master':
      bpo-38392: Only declare visit_validate() if Py_DEBUG is defined (GH-16689)
      a544773

    5. vstinner commented on Oct 10, 2019

      @vstinner
      Member

      Thanks for the report. It's now fixed.

    6. transferred this issue fromon Apr 10, 2022
    Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

    Metadata

    Metadata

    Assignees

    Labels

    3.9 (EOL)end of lifeinterpreter-core(Objects, Python, Grammar, and Parser dirs)type-featureA feature request or enhancement

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions