Staging
v0.5.1
https://github.com/python/cpython
Revision 89b5ea297d67f5efeb8fca0b63fa3d9f7030b2f0 authored by Serhiy Storchaka on 19 December 2018, 15:11:02 UTC, committed by GitHub on 19 December 2018, 15:11:02 UTC
In _localemodule.c and selectmodule.c, remove dead code that would
cause double decrefs if run.

In addition, replace PyList_SetItem() with PyList_SET_ITEM() in cases
where a new list is populated and there is no possibility of an error.

In addition, check if the list changed size in the loop in array_array_fromlist().
(cherry picked from commit 99d56b53560b3867844472ae381fb3f858760621)

Co-authored-by: Zackery Spytz <zspytz@gmail.com>
1 parent 838645d
Raw File
Tip revision: 89b5ea297d67f5efeb8fca0b63fa3d9f7030b2f0 authored by Serhiy Storchaka on 19 December 2018, 15:11:02 UTC
[2.7] bpo-35441: Remove dead and buggy code related to PyList_SetItem(). (GH-11033) (GH-11234)
Tip revision: 89b5ea2
openssl.props
<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
  <Import Project="pyproject.props" />

  <PropertyGroup Label="Configuration">
    <ConfigurationType>StaticLibrary</ConfigurationType>
    <IntDir>$(opensslDir)tmp\$(ArchName)_$(Configuration)\$(ProjectName)\</IntDir>
    <IntDir Condition="$(Configuration) == 'PGInstrument' or $(Configuration) == 'PGUpdate'">$(opensslDir)tmp\$(ArchName)\$(ProjectName)\</IntDir>
  </PropertyGroup>

  <ItemGroup>
    <PreprocessorDefinitions Include="DSO_WIN32" />
    <PreprocessorDefinitions Include="WIN32_LEAN_AND_MEAN" />
    <PreprocessorDefinitions Include="L_ENDIAN" />
    <PreprocessorDefinitions Include="_CRT_SECURE_NO_WARNINGS" />
    <PreprocessorDefinitions Include="_CRT_SECURE_NO_DEPRECATE" />
    <PreprocessorDefinitions Include="OPENSSL_THREADS" />
    <!-- <PreprocessorDefinitions Include="OPENSSL_SYSNAME_WIN32" /> -->
    <PreprocessorDefinitions Include="OPENSSL_IA32_SSE2" />
    <PreprocessorDefinitions Include="SHA1_ASM" />
    <PreprocessorDefinitions Include="SHA256_ASM" />
    <PreprocessorDefinitions Include="SHA512_ASM" />
    <PreprocessorDefinitions Include="MD5_ASM" />
    <PreprocessorDefinitions Include="AES_ASM" />
    <PreprocessorDefinitions Include="VPAES_ASM" />
    <PreprocessorDefinitions Include="WHIRLPOOL_ASM" />
    <PreprocessorDefinitions Include="GHASH_ASM" />
    <PreprocessorDefinitions Include="OPENSSL_NO_IDEA" />
    <PreprocessorDefinitions Include="OPENSSL_NO_RC5" />
    <PreprocessorDefinitions Include="OPENSSL_NO_MD2" />
    <PreprocessorDefinitions Include="OPENSSL_NO_MDC2" />
    <PreprocessorDefinitions Include="OPENSSL_NO_KRB5" />
    <PreprocessorDefinitions Include="OPENSSL_NO_JPAKE" />
    <PreprocessorDefinitions Include="OPENSSL_NO_RDRAND" />
    <PreprocessorDefinitions Include="OPENSSL_NO_RSAX" />
    <PreprocessorDefinitions Include="OPENSSL_NO_DYNAMIC_ENGINE" />
  </ItemGroup>
  <ItemGroup Condition="'$(Platform)'=='Win32'">
    <PreprocessorDefinitions Include="OPENSSL_BN_ASM_GF2m" />
    <PreprocessorDefinitions Include="OPENSSL_BN_ASM_PART_WORDS" />
    <PreprocessorDefinitions Include="OPENSSL_BN_ASM_MONT" />
    <PreprocessorDefinitions Include="RMD160_ASM" />
  </ItemGroup>

  <PropertyGroup>
    <_PreprocessorDefinitionList>@(PreprocessorDefinitions)</_PreprocessorDefinitionList>
  </PropertyGroup>

  <ItemDefinitionGroup>
    <ClCompile>
      <!-- Suppress 64-bit truncation warnings - they aren't ours to worry about -->
      <DisableSpecificWarnings>4244;4267</DisableSpecificWarnings>
      <AdditionalIncludeDirectories>$(opensslDir);$(opensslIncludeDir);$(opensslDir)crypto;$(opensslDir)crypto\asn1;$(opensslDir)crypto\evp;$(opensslDir)crypto\modes</AdditionalIncludeDirectories>
      <PreprocessorDefinitions>$(_PreprocessorDefinitionList);%(PreprocessorDefinitions)</PreprocessorDefinitions>
    </ClCompile>
  </ItemDefinitionGroup>

  <Target Name="FindNasm">
    <PropertyGroup>
      <nasm Condition="$(Platform) == 'Win32'">nasm.exe -f win32</nasm>
      <nasm Condition="$(Platform) == 'x64'">nasm.exe -f win64 -DNEAR -Ox -g</nasm>
    </PropertyGroup>
  </Target>

  <Target Name="BuildNasmFiles" BeforeTargets="PreBuildEvent" DependsOnTargets="PrepareForBuild;FindNasm" Inputs="@(NasmCompile)" Outputs="@(NasmCompile->'$(IntDir)%(Filename).obj')">
    <Exec Command='setlocal
set PATH=$(nasmDir);%PATH%
$(nasm) -o "$(IntDir)%(NasmCompile.Filename).obj" "%(NasmCompile.FullPath)"' />
    <ItemGroup>
      <Link Include="$(IntDir)%(NasmCompile.Filename).obj" />
      <Lib Include="$(IntDir)%(NasmCompile.Filename).obj" />
    </ItemGroup>
  </Target>
</Project>
back to top