Staging
v0.5.1
https://github.com/python/cpython
Revision 9478d07ee71161a8098da53b4b902899f36bf6ba authored by Guido van Rossum on 07 September 2001, 18:52:13 UTC, committed by Guido van Rossum on 07 September 2001, 18:52:13 UTC
a->tp_mro.  If a doesn't have class, it's considered a subclass only
of itself or of 'object'.

This one fix is enough to prevent the ExtensionClass test suite from
dumping core, but that doesn't say much (it's a rather small test
suite).  Also note that for ExtensionClass-defined types, a different
subclass test may be needed.  But I haven't checked whether
PyType_IsSubtype() is actually used in situations where this matters
-- probably it doesn't, since we also don't check for classic classes.
1 parent 317e9f5
Raw File
Tip revision: 9478d07ee71161a8098da53b4b902899f36bf6ba authored by Guido van Rossum on 07 September 2001, 18:52:13 UTC
PyType_IsSubtype(): test tp_flags for HAVE_CLASS bit before accessing
Tip revision: 9478d07
python_nt.rc
// Resource script for Python core DLL.
// Currently only holds version information.
//
#include "ver.h"
#include "winver.h"

#define MS_WINDOWS
#include "modsupport.h"
#include "patchlevel.h"

/* Across releases, change:
 *    MS_DLL_ID if the minor version number changes.
 *    PYTHON_DLL_NAME ditto.
 * MS_DLL_ID must match PY_VERSION in the Windows install script.
 */
#define MS_DLL_ID "2.2"

#ifndef PYTHON_DLL_NAME
#define PYTHON_DLL_NAME "python22.dll"
#endif

/* Nothing below this should need to be changed except for copyright
 * notices and company name.
 */

/* e.g., 2.1a2
 * PY_VERSION comes from patchevel.h
 */
#define PYTHON_VERSION PY_VERSION "\0"

/* 64-bit version number as comma-separated list of 4 16-bit ints */
#if PY_MICRO_VERSION > 64
#   error "PY_MICRO_VERSION > 64"
#endif
#if PY_RELEASE_LEVEL > 99
#   error "PY_RELEASE_LEVEL > 99"
#endif
#if PY_RELEASE_SERIAL > 9
#   error "PY_RELEASE_SERIAL > 9"
#endif
#define FIELD3 (PY_MICRO_VERSION*1000 + PY_RELEASE_LEVEL*10 + PY_RELEASE_SERIAL)
#define PYVERSION64 PY_MAJOR_VERSION, PY_MINOR_VERSION, FIELD3, PYTHON_API_VERSION

// String Tables
STRINGTABLE DISCARDABLE
BEGIN
    1000,   MS_DLL_ID
END

/////////////////////////////////////////////////////////////////////////////
//
// Version
//

VS_VERSION_INFO VERSIONINFO
 FILEVERSION PYVERSION64
 PRODUCTVERSION PYVERSION64
 FILEFLAGSMASK 0x3fL
#ifdef _DEBUG
 FILEFLAGS 0x1L
#else
 FILEFLAGS 0x0L
#endif
 FILEOS 0x40004L
 FILETYPE 0x1L
 FILESUBTYPE 0x0L
BEGIN
    BLOCK "StringFileInfo"
    BEGIN
        BLOCK "000004b0"
        BEGIN
            VALUE "CompanyName", "PythonLabs at Zope Corporation\0"
            VALUE "FileDescription", "Python Core\0"
            VALUE "FileVersion", PYTHON_VERSION
            VALUE "InternalName", "Python DLL\0"
            VALUE "LegalCopyright", "Copyright © 2001 Python Software Foundation. Copyright © 2000 BeOpen.com. Copyright © 1995-2001 CNRI. Copyright © 1991-1995 SMC.\0"
            VALUE "OriginalFilename", PYTHON_DLL_NAME "\0"
            VALUE "ProductName", "Python\0"
            VALUE "ProductVersion", PYTHON_VERSION
        END
    END
    BLOCK "VarFileInfo"
    BEGIN
        VALUE "Translation", 0x0, 1200
    END
END
back to top