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

Comments

gh-116869: Fix redefinition of the _PyOptimizerObject type#116963

Merged
vstinner merged 1 commit intopython:mainfrom
vstinner:capi_optimizer
Mar 18, 2024
Merged

gh-116869: Fix redefinition of the _PyOptimizerObject type#116963
vstinner merged 1 commit intopython:mainfrom
vstinner:capi_optimizer

Conversation

@vstinner
Copy link
Member

@vstinnervstinner commentedMar 18, 2024
edited by bedevere-appbot
Loading

Defining a type twice is a C11 feature and so makes the C API incompatible with C99. Fix the issue by only defining the type once.

Example of warning (treated as an error):

In file included from Include/Python.h:122:Include/cpython/optimizer.h:77:3: error: redefinition of typedef'_PyOptimizerObject' is a C11 feature [-Werror,-Wtypedef-redefinition]} _PyOptimizerObject;^build/Include/cpython/optimizer.h:60:35: note: previous definition is heretypedef struct _PyOptimizerObject _PyOptimizerObject;                                ^

Defining a type twice is a C11 feature and so makes the C APIincompatible with C99. Fix the issue by only defining the type once.Example of warning (treated as an error):    In file included from Include/Python.h:122:    Include/cpython/optimizer.h:77:3: error: redefinition of typedef    '_PyOptimizerObject' is a C11 feature [-Werror,-Wtypedef-redefinition]    } _PyOptimizerObject;    ^    build/Include/cpython/optimizer.h:60:35: note: previous definition is here    typedef struct _PyOptimizerObject _PyOptimizerObject;                                    ^
@vstinnervstinnerenabled auto-merge (squash)March 18, 2024 15:51
@vstinnervstinner merged commitf139d84 intopython:mainMar 18, 2024
@vstinnervstinner deleted the capi_optimizer branchMarch 18, 2024 16:14
vstinner added a commit to vstinner/cpython that referenced this pull requestMar 20, 2024
…hon#116963)Defining a type twice is a C11 feature and so makes the C APIincompatible with C99. Fix the issue by only defining the type once.Example of warning (treated as an error):    In file included from Include/Python.h:122:    Include/cpython/optimizer.h:77:3: error: redefinition of typedef    '_PyOptimizerObject' is a C11 feature [-Werror,-Wtypedef-redefinition]    } _PyOptimizerObject;    ^    build/Include/cpython/optimizer.h:60:35: note: previous definition is here    typedef struct _PyOptimizerObject _PyOptimizerObject;                                    ^
adorilson pushed a commit to adorilson/cpython that referenced this pull requestMar 25, 2024
…hon#116963)Defining a type twice is a C11 feature and so makes the C APIincompatible with C99. Fix the issue by only defining the type once.Example of warning (treated as an error):    In file included from Include/Python.h:122:    Include/cpython/optimizer.h:77:3: error: redefinition of typedef    '_PyOptimizerObject' is a C11 feature [-Werror,-Wtypedef-redefinition]    } _PyOptimizerObject;    ^    build/Include/cpython/optimizer.h:60:35: note: previous definition is here    typedef struct _PyOptimizerObject _PyOptimizerObject;                                    ^
diegorusso pushed a commit to diegorusso/cpython that referenced this pull requestApr 17, 2024
…hon#116963)Defining a type twice is a C11 feature and so makes the C APIincompatible with C99. Fix the issue by only defining the type once.Example of warning (treated as an error):    In file included from Include/Python.h:122:    Include/cpython/optimizer.h:77:3: error: redefinition of typedef    '_PyOptimizerObject' is a C11 feature [-Werror,-Wtypedef-redefinition]    } _PyOptimizerObject;    ^    build/Include/cpython/optimizer.h:60:35: note: previous definition is here    typedef struct _PyOptimizerObject _PyOptimizerObject;                                    ^
Sign up for freeto join this conversation on GitHub. Already have an account?Sign in to comment

Reviewers

No reviews

Assignees

No one assigned

Labels

Projects

None yet

Milestone

No milestone

Development

Successfully merging this pull request may close these issues.

1 participant

@vstinner

[8]ページ先頭

©2009-2026 Movatter.jp