python / python/cpython

c_bool type not supported for BigEndianStructure on little-endian machine

Open
#74,695 4 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

3.11 build topic-ctypes
Dominant language
Python
Stars
77.2k
Forks
36k
Avg merge
1d 9h
Merged PRs (30d)
558

Description

BPO 30510
Nosy @terryjreedy, @iritkatriel
Files
  • c_bool_bug.py: example of bug
  • init.py: patched file solving problem
  • 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 = None
    created_at = <Date 2017-05-30.10:35:54.469>
    labels = ['ctypes', 'build', '3.11']
    title = 'c_bool type not supported for BigEndianStructure on little-endian machine'
    updated_at = <Date 2022-01-23.18:29:53.273>
    user = 'https://bugs.python.org/HassanElKarouni'
    

    bugs.python.org fields:

    activity = <Date 2022-01-23.18:29:53.273>
    actor = 'iritkatriel'
    assignee = 'none'
    closed = False
    closed_date = None
    closer = None
    components = ['ctypes']
    creation = <Date 2017-05-30.10:35:54.469>
    creator = 'Hassan El Karouni'
    dependencies = []
    files = ['46926', '46927']
    hgrepos = []
    issue_num = 30510
    keywords = []
    message_count = 3.0
    messages = ['294747', '295063', '411394']
    nosy_count = 3.0
    nosy_names = ['terry.reedy', 'Hassan El Karouni', 'iritkatriel']
    pr_nums = []
    priority = 'normal'
    resolution = None
    stage = None
    status = 'open'
    superseder = None
    type = 'compile error'
    url = 'https://bugs.python.org/issue30510'
    versions = ['Python 3.11']
    

    Linked PRs
    • gh-127280

    Contributor guide

    Open the contributing guide

    First steps

    1. Read the whole issue, then the project's contributing guide.
    2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
    3. Fork the repository and make your change on a branch.
    4. Open a pull request that references the issue number.

    Research direction

    Start with the c_bool_bug.py example and the uploaded init.py patch, then compare the current ctypes implementation with linked PR gh-127280. Reproduce the BigEndianStructure case on a little-endian machine and verify that c_bool is accepted without breaking existing ctypes behavior.

    Written by the indexing model from the issue text.

    Assessment

    Tech stack
    python
    Domain
    backend
    Issue type
    Bug
    Difficulty
    3/5
    Estimated time
    1-2 days
    Activity status
    Stale
    Clarity
    Mostly clear
    Newbie friendliness
    35/100

    Get new issues in your inbox

    A short digest of beginner-friendly GitHub issues.