New `_Py_STDC_VERSION` macro not available in pyport.h

オープン
#160,719 コメント 0 件 リアクション 0 件 担当者 0 名 GitHub で見る

メンテナーはふだん 1 日以内に返信

まだ誰も着手していません。

評価

難易度
2/5
見積もり時間
1〜3時間
初心者へのやさしさ
35/100
issue の種類
バグ
明瞭さ
明確に書かれている
活発さ
活発
技術スタック
c
領域
build-system

調査の方向性

Read Include/pyport.h around lines 494–495 and Include/Python.h around lines 67–71, then trace where Include/pymacro.h is included. Check the reported include order and confirm whether _Py_STDC_VERSION is defined when pyport.h uses it; done means the macro is available at that point and the affected branch can work as intended.

索引モデルが issue の本文から書いたものです。

説明

topic-C-API type-bug
Bug report

The new _Py_STDC_VERSION macro introduced in 47163e53753ea681d2b4bd2683f4ca4833838b89, is located in Include/pymacro.h‎ and used in Include/pyport.h, but it seems pymacro.h‎ is only ever included in Python.h, and after pyport.h:

https://github.com/python/cpython/blob/210e7ab2a581af5d106c5b648db0a6f9535004aa/Include/Python.h#L67-L71

So for example this branch will never be true because _Py_STDC_VERSION is undefined here:
https://github.com/python/cpython/blob/f4043ab1be0205d834a8b9aa72e289be12637344/Include/pyport.h#L494-L495

CPython versions tested on:

3.15, CPython main branch

Operating systems tested on:

Linux

Linked PRs
  • gh-160733
主要言語
Python
スター
77.8k
フォーク
37.7k
平均マージ
17時間 24分
マージ済み PR(30日)
716

環境構築

Codespaces で開く

このプロジェクトの開発コンテナを、あなたの GitHub アカウントでブラウザ上に起動します。

はじめの一歩

  1. issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
  2. 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
  3. リポジトリをフォークし、ブランチを切って変更します。
  4. issue 番号を参照したプルリクエストを送ります。

python/cpython のほかの issue

python/cpython の issue をすべて見る

似ている issue

Python の issue をもっと見る

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。