aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorVictor Stinner <vstinner@python.org>2020-11-02 22:03:28 +0100
committerGitHub <noreply@github.com>2020-11-02 22:03:28 +0100
commit5cf4782a2630629d0978bf4cf6b6340365f449b2 (patch)
treee54caf1ea68b6c0ded1d72d72a35db3ab7224138 /PCbuild
parentbpo-42103: Improve validation of Plist files. (GH-22882) (diff)
downloadcpython-5cf4782a2630629d0978bf4cf6b6340365f449b2.tar.gz
cpython-5cf4782a2630629d0978bf4cf6b6340365f449b2.tar.bz2
cpython-5cf4782a2630629d0978bf4cf6b6340365f449b2.zip
bpo-41796: Make _ast module state per interpreter (GH-23024)
The ast module internal state is now per interpreter. * Rename "astmodulestate" to "struct ast_state" * Add pycore_ast.h internal header: the ast_state structure is now declared in pycore_ast.h. * Add PyInterpreterState.ast (struct ast_state) * Remove get_ast_state() * Rename get_global_ast_state() to get_ast_state() * PyAST_obj2mod() now handles get_ast_state() failures
Diffstat (limited to 'PCbuild')
-rw-r--r--PCbuild/regen.vcxproj12
1 files changed, 9 insertions, 3 deletions
diff --git a/PCbuild/regen.vcxproj b/PCbuild/regen.vcxproj
index 90d6dc68d54..936f5fd2464 100644
--- a/PCbuild/regen.vcxproj
+++ b/PCbuild/regen.vcxproj
@@ -137,6 +137,8 @@
</None>
<None Include="..\Include\opcode.h">
</None>
+ <None Include="..\Include\internal\pycore_ast.h">
+ </None>
<None Include="..\Include\Python-ast.h">
</None>
<None Include="..\Python\Python-ast.c">
@@ -161,15 +163,18 @@
<Warning Text="Pegen updated. You will need to rebuild pythoncore to see the changes." Condition="'@(_UpdatedParse)' != ''" />
</Target>
<Target Name="_RegenAST_H" AfterTargets="_RegenGrammar">
- <!-- Regenerate Include/Python-ast.h and Python/Python-ast.c using Parser/asdl_c.py -h -->
- <Exec Command="&quot;$(PythonExe)&quot; &quot;$(PySourcePath)Parser\asdl_c.py&quot; &quot;$(PySourcePath)Parser\Python.asdl&quot; -H &quot;$(IntDir)Python-ast.h&quot; -C &quot;$(IntDir)Python-ast.c&quot;" />
+ <!-- Regenerate Include/Python-ast.h, Python/Python-ast.c and Include/internal/pycore_ast.h using Parser/asdl_c.py -h -->
+ <Exec Command="&quot;$(PythonExe)&quot; &quot;$(PySourcePath)Parser\asdl_c.py&quot; &quot;$(PySourcePath)Parser\Python.asdl&quot; -H &quot;$(IntDir)Python-ast.h&quot; -C &quot;$(IntDir)Python-ast.c&quot; -I &quot;$(IntDir)pycore_ast.h&quot;" />
<Copy SourceFiles="$(IntDir)Python-ast.h" DestinationFiles="$(PySourcePath)Include\Python-ast.h">
<Output TaskParameter="CopiedFiles" ItemName="_UpdatedH" />
</Copy>
<Copy SourceFiles="$(IntDir)Python-ast.c" DestinationFiles="$(PySourcePath)Python\Python-ast.c">
<Output TaskParameter="CopiedFiles" ItemName="_UpdatedC" />
</Copy>
- <Warning Text="ASDL is updated. You will need to rebuild pythoncore to see the changes." Condition="'@(_UpdatedH)' != '' and '@(_UpdatedC)' != ''" />
+ <Copy SourceFiles="$(IntDir)pycore_ast.h" DestinationFiles="$(PySourcePath)Include\internal\pycore_ast.h">
+ <Output TaskParameter="CopiedFiles" ItemName="_UpdatedInternalH" />
+ </Copy>
+ <Warning Text="ASDL is updated. You will need to rebuild pythoncore to see the changes." Condition="'@(_UpdatedH)' != '' != '' and '@(_UpdatedC)' != '' and @(_UpdatedInternalH)'" />
</Target>
<Target Name="_RegenOpcodes" AfterTargets="_RegenAST_C">
<!-- Regenerate Include/opcode.h from Lib/opcode.py using Tools/scripts/generate_opcode_h.py-->
@@ -204,6 +209,7 @@
<Clean Include="$(IntDir)opcode.h" />
<Clean Include="$(IntDir)Python-ast.c" />
<Clean Include="$(IntDir)Python-ast.h" />
+ <Clean Include="$(IntDir)pycore_ast.h" />
</ItemGroup>
</Target>
</Project>