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

time_clockid_converter() selects the wrong type for clockid_t on Cygwin. #134771

Closed
Labels
extension-modulesC modules in the Modules dirtype-bugAn unexpected behavior, bug, or error
@collinfunk

Description

@collinfunk

Bug report

Bug description:

Building Python from the main branch on Python fails with the following error:

gcc  -fno-strict-overflow -Wsign-compare -DNDEBUG -g -O3 -Wall    -std=c11 -Wextra -Wno-unused-parameter -Wno-missing-field-initializers -Wstrict-prototypes -Werror=implicit-function-declaration -fvisibility=hidden  -I./Include/internal -I./Include/internal/mimalloc  -I. -I./Include    -DPy_BUILD_CORE_BUILTIN -c ./Modules/timemodule.c -o Modules/timemodule.oIn file included from ./Include/Python.h:19,                 from ./Modules/timemodule.c:3:./Modules/timemodule.c: Infunction‘time_clockid_converter’:./Include/pymacro.h:118:13: error: static assertion failed:"sizeof(clk_id) == sizeof(*p)"  118|             static_assert((cond), #cond); \      |             ^~~~~~~~~~~~~./Modules/timemodule.c:203:5: note: in expansion of macro ‘Py_BUILD_ASSERT’203 |     Py_BUILD_ASSERT(sizeof(clk_id) == sizeof(*p));|     ^~~~~~~~~~~~~~~make:*** [Makefile:3789: Modules/timemodule.o] Error 1

This is because we useint clk_id = PyLong_AsInt(obj); when it should be along on this platform.

CPython versions tested on:

CPython main branch

Operating systems tested on:

Other

Linked PRs

Metadata

Metadata

Assignees

No one assigned

    Labels

    extension-modulesC modules in the Modules dirtype-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