Skip to content

Add PyLong_AsLongLongAndOverflow #52015

Closed

Description

@casevh
mannequin
BPO 7767
Nosy @mdickinson
Files
  • patch_longlong.diff: Patch for PyLong_AsLongLongAndOverflow.
  • 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/mdickinson'
    closed_at = <Date 2010-01-30.10:31:14.484>
    created_at = <Date 2010-01-24.01:16:47.643>
    labels = ['interpreter-core', 'type-feature']
    title = 'Add PyLong_AsLongLongAndOverflow'
    updated_at = <Date 2010-01-30.10:31:14.475>
    user = 'https://bugs.python.org/casevh'

    bugs.python.org fields:

    activity = <Date 2010-01-30.10:31:14.475>
    actor = 'mark.dickinson'
    assignee = 'mark.dickinson'
    closed = True
    closed_date = <Date 2010-01-30.10:31:14.484>
    closer = 'mark.dickinson'
    components = ['Interpreter Core']
    creation = <Date 2010-01-24.01:16:47.643>
    creator = 'casevh'
    dependencies = []
    files = ['15985']
    hgrepos = []
    issue_num = 7767
    keywords = ['patch', 'needs review']
    message_count = 5.0
    messages = ['98203', '98539', '98547', '98556', '98558']
    nosy_count = 2.0
    nosy_names = ['mark.dickinson', 'casevh']
    pr_nums = []
    priority = 'normal'
    resolution = 'accepted'
    stage = 'patch review'
    status = 'closed'
    superseder = None
    type = 'enhancement'
    url = 'https://bugs.python.org/issue7767'
    versions = ['Python 2.7', 'Python 3.2']

    Activity

    1. casevh commented on Jan 24, 2010

      casevhmannequin
      MannequinAuthor

      There are "Long" and "LongLong" variants for most of the C API functions that work with PyLong. This patch adds a "LongLong" version of PyLong_AsLongAndOverflow.

      This function will be helpful on 64-bit Windows platforms to quickly get a 64-bit integer or detect the need for multiple precision (or overflow).

      I can use this functionality for gmpy.

    2. added
      extension-modules
      type-feature
      on Jan 24, 2010
    3. added
      interpreter-core
      and removed
      extension-modules
      on Jan 24, 2010
    4. self-assigned this
      on Jan 24, 2010
    5. mdickinson commented on Jan 29, 2010

      @mdickinson
      Member

      The proposed addition sounds entirely reasonable to me.

      In your patch, is there a reason for leaving out the first PyInt_Check (compare with PyLong_AsLongAndOverflow)?

    6. casevh commented on Jan 30, 2010

      casevhmannequin
      MannequinAuthor

      The missing PyInt_Check is a mistake. I probably thought I was working on a py3k version.

      Let me know if I should create a new patch or if I should create one for py3k.

      Thanks for the review.

    7. mdickinson commented on Jan 30, 2010

      @mdickinson
      Member

      Ok, great. I'll add the PyInt_Check back in and commit the patch, then. I just wanted to check that I wasn't missing something obvious. Thank you!

    8. mdickinson commented on Jan 30, 2010

      @mdickinson
      Member

      Applied in r77842 (trunk), r77843 (py3k).

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

    interpreter-coretype-feature

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions