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

ctypes.POINTER.set_type doesn't reset format #142966

Open
Labels
@youknowone

Description

@youknowone

Bug report

Bug description:

# Add a code block here, if requireddeftest_set_type_updates_format(self):# to match the element type's formatwithself.assertWarns(DeprecationWarning):lp=POINTER("node")classnode(Structure):_fields_= [("value",c_int)]# Get the expected format before set_typenode_format=memoryview(node()).formatexpected_format="&"+node_formatlp.set_type(node)# Create instance to check format via memoryviewn=node(42)p=lp(n)actual_format=memoryview(p).format# After set_type, the pointer's format should be "&<element_format>"self.assertEqual(actual_format,expected_format)

CPython versions tested on:

CPython main branch

Operating systems tested on:

macOS

Linked PRs

Metadata

Metadata

Assignees

No one assigned

    Labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions


      [8]ページ先頭

      ©2009-2025 Movatter.jp