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

3.12.0b1: static declaration follows non-static when importing internal/pycore_dict.h #105268

Closed
Labels
3.12only security fixes3.13bugs and security fixestype-bugAn unexpected behavior, bug, or error
@P403n1x87

Description

@P403n1x87

Bug report

I have a change within aproject that includes a native extension which fails to compile with 3.12.0b1:

      In file included from echion/coremodule.cc:22:      In file included from ./echion/dict.h:7:      In file included from /Users/gabriele/.pyenv/versions/3.12.0b1/include/python3.12/internal/pycore_dict.h:13:      In file included from /Users/gabriele/.pyenv/versions/3.12.0b1/include/python3.12/internal/pycore_runtime.h:16:      In file included from /Users/gabriele/.pyenv/versions/3.12.0b1/include/python3.12/internal/pycore_global_objects.h:11:      /Users/gabriele/.pyenv/versions/3.12.0b1/include/python3.12/internal/pycore_gc.h:84:19: error: static declaration of 'PyObject_GC_IsFinalized' follows non-static declaration      static inline int _PyGC_FINALIZED(PyObject *op) {                        ^      /Users/gabriele/.pyenv/versions/3.12.0b1/include/python3.12/cpython/objimpl.h:85:30: note: expanded from macro '_PyGC_FINALIZED'      #  define _PyGC_FINALIZED(o) PyObject_GC_IsFinalized(o)                                   ^      /Users/gabriele/.pyenv/versions/3.12.0b1/include/python3.12/objimpl.h:209:17: note: previous declaration is here      PyAPI_FUNC(int) PyObject_GC_IsFinalized(PyObject *);

I didn't look too deep into what changed here, but my guess would be that the macro should drop the_ prefix, i.e.

#  define PyGC_FINALIZED(o) PyObject_GC_IsFinalized(o)

since it seems thatPyObject_GC_IsFinalized is part of the API. The same code compiles fine with older versions of Python.

Your environment

MacOS Ventura 13.3.1
Python 3.12.0b1

Linked PRs

Metadata

Metadata

Assignees

No one assigned

    Labels

    3.12only security fixes3.13bugs and security fixestype-bugAn unexpected behavior, bug, or error

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions


      [8]ページ先頭

      ©2009-2025 Movatter.jp