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

Argument Clinic: compare signed and unsigned ints #64455

Closed
serhiy-storchaka opened this issue Jan 14, 2014 · 4 comments
Closed

Argument Clinic: compare signed and unsigned ints #64455

serhiy-storchaka opened this issue Jan 14, 2014 · 4 comments
Labels
topic-argument-clinic type-bug An unexpected behavior, bug, or error

Comments

@serhiy-storchaka
Copy link
Member

BPO 20256
Nosy @larryhastings, @serhiy-storchaka
Superseder
  • bpo-22120: Return converter code generated by Argument Clinic has a warning for unsigned types
  • 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 2016-06-19.16:15:03.973>
    created_at = <Date 2014-01-14.08:35:49.513>
    labels = ['type-bug', 'expert-argument-clinic']
    title = 'Argument Clinic: compare signed and unsigned ints'
    updated_at = <Date 2016-06-19.16:15:03.971>
    user = 'https://github.com/serhiy-storchaka'

    bugs.python.org fields:

    activity = <Date 2016-06-19.16:15:03.971>
    actor = 'serhiy.storchaka'
    assignee = 'none'
    closed = True
    closed_date = <Date 2016-06-19.16:15:03.973>
    closer = 'serhiy.storchaka'
    components = ['Demos and Tools', 'Argument Clinic']
    creation = <Date 2014-01-14.08:35:49.513>
    creator = 'serhiy.storchaka'
    dependencies = []
    files = []
    hgrepos = []
    issue_num = 20256
    keywords = []
    message_count = 4.0
    messages = ['208083', '208244', '208251', '268855']
    nosy_count = 2.0
    nosy_names = ['larry', 'serhiy.storchaka']
    pr_nums = []
    priority = 'normal'
    resolution = 'duplicate'
    stage = 'resolved'
    status = 'closed'
    superseder = '22120'
    type = 'behavior'
    url = 'https://bugs.python.org/issue20256'
    versions = ['Python 3.4']

    @serhiy-storchaka
    Copy link
    Member Author

    For unsigned_int, unsigned_long and size_t return converters Argument Clinic generates a code which compares unsigned integer return_value with signed -1.

    @serhiy-storchaka serhiy-storchaka added the type-bug An unexpected behavior, bug, or error label Jan 14, 2014
    @larryhastings
    Copy link
    Contributor

    Good point. My brain is dead. What would be a better "magic cookie" value?

    @serhiy-storchaka
    Copy link
    Member Author

    (unsigned int)-1 etc.

    @serhiy-storchaka
    Copy link
    Member Author

    Was fixed in duplicate bpo-22120.

    @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
    topic-argument-clinic type-bug An unexpected behavior, bug, or error
    Projects
    None yet
    Development

    No branches or pull requests

    2 participants