New `_Py_STDC_VERSION` macro not available in pyport.h

Aberta
#160,719 0 comentários 0 reações 0 responsáveis Ver no GitHub

Mantenedores costumam responder em até 1 dia

Ninguém assumiu esta issue ainda.

Avaliação

Dificuldade
2/5
Tempo estimado
1-3 horas
Facilidade para iniciantes
35/100
Tipo de issue
Bug
Clareza
Claramente especificada
Status de atividade
Ativa
Stack de tecnologia
c
Domínio
build-system

Direção de pesquisa

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.

Escrita pelo modelo de indexação a partir do texto da issue.

Descrição

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
Linguagem predominante
Python
Estrelas
77.8k
Forks
37.7k
Merge médio
17h 24min
PRs com merge (30d)
716

Preparar o ambiente

Abrir no Codespaces

Inicia o contêiner de desenvolvimento do projeto no navegador, com a sua própria conta do GitHub.

Primeiros passos

  1. Leia a issue inteira e depois o guia de contribuição do projeto.
  2. Comente na issue dizendo que vai assumir — evita que duas pessoas façam o mesmo trabalho.
  3. Faça um fork do repositório e trabalhe em uma branch.
  4. Abra um pull request que referencie o número da issue.

Mais de python/cpython

Todas as issues de python/cpython

Issues semelhantes

Mais issues de Python

Receba novas issues na sua caixa de entrada

Um resumo curto de issues do GitHub para quem está começando.