Skip to content

Commit

Permalink
Remove dead code for too old compiler versions
Browse files Browse the repository at this point in the history
  • Loading branch information
Avasam committed Feb 23, 2025
1 parent fabbd69 commit 530b68a
Show file tree
Hide file tree
Showing 3 changed files with 0 additions and 19 deletions.
7 changes: 0 additions & 7 deletions com/win32com/src/oleargs.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1462,16 +1462,9 @@ BOOL PythonOleArgHelper::MakeObjToVariant(PyObject *obj, VARIANT *var, PyObject
break;
case VT_BOOL | VT_BYREF:
if (bCreateBuffers)
#if _MSC_VER <= 1010
// use this macro for MSVC4.1 or before
V_BOOLREF(var) = &m_boolBuf;
#define MYBOOLREF V_BOOLREF(var)
#else
// this is used in MSVC4.2 and after
var->pboolVal = &m_boolBuf;
#define MYBOOLREF (var->pboolVal)
#endif

if (!VALID_BYREF_MISSING(obj)) {
if ((obUse = PyNumber_Long(obj)) == NULL)
BREAK_FALSE
Expand Down
4 changes: 0 additions & 4 deletions win32/src/win32file.i
Original file line number Diff line number Diff line change
Expand Up @@ -53,10 +53,6 @@
# undef socklen_t
#endif
#include "Ws2tcpip.h"
// *sob* - msvc6 can't handle the _WSPIAPI_COUNTOF in later SDKs...
#if _MSC_VER < 1300
#define _WSPIAPI_COUNTOF(_Array) (sizeof(_Array) / sizeof(_Array[0]))
#endif
#include "Wspiapi.h" // for WspiapiGetAddrInfo/WspiapiFreeAddrInfo

#define NEED_PYWINOBJECTS_H
Expand Down
8 changes: 0 additions & 8 deletions win32/src/win32helpmodule.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -18,14 +18,6 @@ generates Windows .hlp files.
#include "htmlhelp.h"

#define DllExport _declspec(dllexport)

#if _MSC_VER == 1500
// This uses htmlhelp.lib, which causes an unresolved external for
// __report_rangecheckfailure with vs2008 (which is what we used for Python 2)
// No idea why, but we define it here and cause it to kill the process if it is ever hit.
extern "C" __declspec(noreturn, dllexport) void __cdecl __report_rangecheckfailure(void) { ::ExitProcess(1); }
#endif

#define PyW32_BEGIN_ALLOW_THREADS PyThreadState *_save = PyEval_SaveThread()
#define PyW32_END_ALLOW_THREADS PyEval_RestoreThread(_save)

Expand Down

0 comments on commit 530b68a

Please sign in to comment.