Skip to content

PyMethodDef ml_name is char* instead of const char* #65218

Closed

Description

@hvenev
mannequin
BPO 21019
Nosy @loewis, @methane, @hvenev

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 2019-03-28.13:20:01.824>
created_at = <Date 2014-03-22.10:14:14.015>
labels = ['extension-modules']
title = 'PyMethodDef ml_name is char* instead of const char*'
updated_at = <Date 2019-03-28.13:20:01.818>
user = 'https://github.com/hvenev'

bugs.python.org fields:

activity = <Date 2019-03-28.13:20:01.818>
actor = 'methane'
assignee = 'none'
closed = True
closed_date = <Date 2019-03-28.13:20:01.824>
closer = 'methane'
components = ['Extension Modules']
creation = <Date 2014-03-22.10:14:14.015>
creator = 'h.venev'
dependencies = []
files = []
hgrepos = []
issue_num = 21019
keywords = []
message_count = 6.0
messages = ['214451', '214463', '214474', '214503', '214506', '339033']
nosy_count = 5.0
nosy_names = ['loewis', 'Arfrever', 'methane', 'tshepang', 'h.venev']
pr_nums = []
priority = 'normal'
resolution = 'fixed'
stage = 'resolved'
status = 'closed'
superseder = None
type = None
url = 'https://bugs.python.org/issue21019'
versions = ['Python 3.4']

Activity

  1. hvenev commented on Mar 22, 2014

    hvenevmannequin
    MannequinAuthor

    It would be better if string literals could be used there.

  2. loewis commented on Mar 22, 2014

    loewismannequin
    Mannequin

    Why are you suggesting that string literals cannot be used? Works fine for me.

  3. hvenev commented on Mar 22, 2014

    hvenevmannequin
    MannequinAuthor

    error: deprecated conversion from string constant to ‘char*’

    I like -Werror.

  4. loewis commented on Mar 22, 2014

    loewismannequin
    Mannequin

    I still can't reproduce the problem, not even with -Werror:

    loewis@dinsdale:~$ cat a.c
    struct Foo{
      char *text;
    };
    
    struct Foo f = {
      "data"
    };
    
    int main()
    {
      return 0;
    }

    loewis@dinsdale:$ gcc -Wall -Werror -o a a.c
    loewis@dinsdale:
    $ gcc --version
    gcc (Debian 4.7.2-5) 4.7.2
    Copyright (C) 2012 Free Software Foundation, Inc.
    This is free software; see the source for copying conditions. There is NO
    warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.

    loewis@dinsdale:~$

  5. hvenev commented on Mar 22, 2014

    hvenevmannequin
    MannequinAuthor

    g++

  6. methane commented on Mar 28, 2019

    @methane
    Member

    It is const char* now.

  7. 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

No one assigned

    Labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions