diff options
Diffstat (limited to 'PC')
-rw-r--r-- | PC/_winreg.c | 11 | ||||
-rw-r--r-- | PC/config.c | 6 | ||||
-rw-r--r-- | PC/pyconfig.h | 10 |
3 files changed, 11 insertions, 16 deletions
diff --git a/PC/_winreg.c b/PC/_winreg.c index ffaaaee500..f1d4c9df92 100644 --- a/PC/_winreg.c +++ b/PC/_winreg.c @@ -693,9 +693,10 @@ static BOOL Py2Reg(PyObject *value, DWORD typ, BYTE **retDataBuf, DWORD *retDataSize) { int i,j; + DWORD d; switch (typ) { case REG_DWORD: - if (value != Py_None && !PyInt_Check(value)) + if (value != Py_None && !PyLong_Check(value)) return FALSE; *retDataBuf = (BYTE *)PyMem_NEW(DWORD, 1); if (*retDataBuf==NULL){ @@ -707,10 +708,10 @@ Py2Reg(PyObject *value, DWORD typ, BYTE **retDataBuf, DWORD *retDataSize) DWORD zero = 0; memcpy(*retDataBuf, &zero, sizeof(DWORD)); } - else - memcpy(*retDataBuf, - &PyInt_AS_LONG((PyIntObject *)value), - sizeof(DWORD)); + else { + d = PyLong_AsLong(value); + memcpy(*retDataBuf, &d, sizeof(DWORD)); + } break; case REG_SZ: case REG_EXPAND_SZ: diff --git a/PC/config.c b/PC/config.c index 30ae456b38..8ca8cef00b 100644 --- a/PC/config.c +++ b/PC/config.c @@ -14,11 +14,9 @@ extern void initcmath(void); extern void initerrno(void); extern void initgc(void); extern void initmath(void); -extern void init_md5(void); extern void initnt(void); extern void initoperator(void); extern void initsignal(void); -extern void init_sha(void); extern void init_sha256(void); extern void init_sha512(void); extern void inittime(void); @@ -61,7 +59,6 @@ extern void init_subprocess(void); extern void init_lsprof(void); extern void init_ast(void); extern void init_types(void); -extern void initatexit(void); /* tools/freeze/makeconfig.py marker for additional "extern" */ /* -- ADDMODULE MARKER 1 -- */ @@ -73,7 +70,6 @@ struct _inittab _PyImport_Inittab[] = { {"array", initarray}, {"_ast", init_ast}, - {"atexit", initatexit}, #ifdef MS_WINDOWS #ifndef MS_WINI64 {"audioop", initaudioop}, @@ -84,11 +80,9 @@ struct _inittab _PyImport_Inittab[] = { {"errno", initerrno}, {"gc", initgc}, {"math", initmath}, - {"_md5", init_md5}, {"nt", initnt}, /* Use the NT os functions, not posix */ {"operator", initoperator}, {"signal", initsignal}, - {"_sha", init_sha}, {"_sha256", init_sha256}, {"_sha512", init_sha512}, {"time", inittime}, diff --git a/PC/pyconfig.h b/PC/pyconfig.h index fed87754a2..5b662cef01 100644 --- a/PC/pyconfig.h +++ b/PC/pyconfig.h @@ -275,9 +275,9 @@ typedef int pid_t; #define HAVE_LONG_LONG 1 #ifndef PY_LONG_LONG # define PY_LONG_LONG __int64 -# define PY_LLONG_MAX LLONG_MAX -# define PY_LLONG_MIN LLONG_MIN -# define PY_ULLONG_MAX ULLONG_MAX +# define PY_LLONG_MAX _I64_MAX +# define PY_LLONG_MIN _I64_MIN +# define PY_ULLONG_MAX _UI64_MAX #endif /* For Windows the Python core is in a DLL by default. Test @@ -303,9 +303,9 @@ Py_NO_ENABLE_SHARED to find out. Also support MS_NO_COREDLL for b/w compat */ their Makefile (other compilers are generally taken care of by distutils.) */ # ifdef _DEBUG -# pragma comment(lib,"python26_d.lib") +# pragma comment(lib,"python30_d.lib") # else -# pragma comment(lib,"python26.lib") +# pragma comment(lib,"python30.lib") # endif /* _DEBUG */ # endif /* _MSC_VER */ # endif /* Py_BUILD_CORE */ |