Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Wrong size of c_ulong/c_ulonglong in Linux #108907

Closed
Labels
docsDocumentation in the Doc dirtopic-ctypestype-bugAn unexpected behavior, bug, or error
@dudekw

Description

@dudekw

Bug report

Bug description:

Attribute_type_ ofc_ulong returnsL, which is correct following theformat characters documentation; however, the documentation says it has 4 bytes size, butsizeof(c_ulong) returns 8 bytes.

>>>sizeof(c_ulong)8>>>c_ulong._type_'L'

Alsoc_ulonglong is automatically casted toc_ulong:

t5=c_ulonglong(200000000000000000000000000000000000)>>> type(t5)<class'ctypes.c_ulong'>

, thus ifc_ulong will have 4 bytes, will be there available a type of 8 bytes size?

CPython versions tested on:

3.8

Operating systems tested on:

Linux

Linked PRs

Metadata

Metadata

Assignees

No one assigned

    Labels

    docsDocumentation in the Doc dirtopic-ctypestype-bugAn unexpected behavior, bug, or error

    Projects

    Status

    Done

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions


      [8]ページ先頭

      ©2009-2026 Movatter.jp