Build obmalloc.c directly instead of #include'ing from object.c.
Also move all _PyMalloc_XXX entry points into obmalloc.c.
The Windows build works fine.
The Unix build is changed here (Makefile.pre.in), but not tested.
No other platform's build process has been fiddled.
diff --git a/PCbuild/pythoncore.dsp b/PCbuild/pythoncore.dsp
index 6495952..b91355f 100644
--- a/PCbuild/pythoncore.dsp
+++ b/PCbuild/pythoncore.dsp
@@ -1268,6 +1268,21 @@
# End Source File
# Begin Source File
+SOURCE=..\Objects\obmalloc.c
+
+!IF "$(CFG)" == "pythoncore - Win32 Release"
+
+!ELSEIF "$(CFG)" == "pythoncore - Win32 Debug"
+
+!ELSEIF "$(CFG)" == "pythoncore - Win32 Alpha Debug"
+
+!ELSEIF "$(CFG)" == "pythoncore - Win32 Alpha Release"
+
+!ENDIF
+
+# End Source File
+# Begin Source File
+
SOURCE=..\Modules\operator.c
!IF "$(CFG)" == "pythoncore - Win32 Release"