New submission from Christian Heimes:
The patch contains the modifications to PCbuild9, socketmodule and some
structmember.h related files after a svn copy py3k/PCbuild9 trunk/
----------
assignee: tiran
components: Windows
files: trunk_pcbuild9.patch
keywords: patch
messages: 57695
nosy: loewis, tiran
priority: normal
severity: normal
status: open
title: PCbuild9 patch for trunk
versions: Python 2.6
Added file: http://bugs.python.org/file8785/trunk_pcbuild9.patch
__________________________________
Tracker <[EMAIL PROTECTED]>
<http://bugs.python.org/issue1474>
__________________________________
Index: Include/structmember.h
===================================================================
--- Include/structmember.h (revision 59011)
+++ Include/structmember.h (working copy)
@@ -77,8 +77,8 @@
#define READONLY 1
#define RO READONLY /* Shorthand */
#define READ_RESTRICTED 2
-#define WRITE_RESTRICTED 4
-#define RESTRICTED (READ_RESTRICTED | WRITE_RESTRICTED)
+#define PY_WRITE_RESTRICTED 4
+#define RESTRICTED (READ_RESTRICTED | PY_WRITE_RESTRICTED)
/* Obsolete API, for binary backwards compatibility */
Index: Modules/socketmodule.c
===================================================================
--- Modules/socketmodule.c (revision 59011)
+++ Modules/socketmodule.c (working copy)
@@ -297,9 +297,11 @@
#endif
#ifndef HAVE_INET_PTON
+#if !defined(NTDDI_VERSION) || (NTDDI_VERSION < NTDDI_LONGHORN)
int inet_pton(int af, const char *src, void *dst);
const char *inet_ntop(int af, const void *src, char *dst, socklen_t size);
#endif
+#endif
#ifdef __APPLE__
/* On OS X, getaddrinfo returns no error indication of lookup
@@ -5039,6 +5041,7 @@
#ifndef HAVE_INET_PTON
+#if !defined(NTDDI_VERSION) || (NTDDI_VERSION < NTDDI_LONGHORN)
/* Simplistic emulation code for inet_pton that only works for IPv4 */
/* These are not exposed because they do not set errno properly */
@@ -5074,3 +5077,4 @@
}
#endif
+#endif
Index: Objects/funcobject.c
===================================================================
--- Objects/funcobject.c (revision 59011)
+++ Objects/funcobject.c (working copy)
@@ -163,13 +163,13 @@
RESTRICTED|READONLY},
{"__closure__", T_OBJECT, OFF(func_closure),
RESTRICTED|READONLY},
- {"func_doc", T_OBJECT, OFF(func_doc), WRITE_RESTRICTED},
- {"__doc__", T_OBJECT, OFF(func_doc), WRITE_RESTRICTED},
+ {"func_doc", T_OBJECT, OFF(func_doc), PY_WRITE_RESTRICTED},
+ {"__doc__", T_OBJECT, OFF(func_doc), PY_WRITE_RESTRICTED},
{"func_globals", T_OBJECT, OFF(func_globals),
RESTRICTED|READONLY},
{"__globals__", T_OBJECT, OFF(func_globals),
RESTRICTED|READONLY},
- {"__module__", T_OBJECT, OFF(func_module), WRITE_RESTRICTED},
+ {"__module__", T_OBJECT, OFF(func_module), PY_WRITE_RESTRICTED},
{NULL} /* Sentinel */
};
Index: Objects/methodobject.c
===================================================================
--- Objects/methodobject.c (revision 59011)
+++ Objects/methodobject.c (working copy)
@@ -180,7 +180,7 @@
#define OFF(x) offsetof(PyCFunctionObject, x)
static PyMemberDef meth_members[] = {
- {"__module__", T_OBJECT, OFF(m_module), WRITE_RESTRICTED},
+ {"__module__", T_OBJECT, OFF(m_module), PY_WRITE_RESTRICTED},
{NULL}
};
Index: PCbuild9/pyproject.vsprops
===================================================================
--- PCbuild9/pyproject.vsprops (revision 59065)
+++ PCbuild9/pyproject.vsprops (working copy)
@@ -37,7 +37,7 @@
/>
<UserMacro
Name="PyDllName"
- Value="python30"
+ Value="python26"
/>
<UserMacro
Name="bsddbDir"
Index: PCbuild9/pythoncore.vcproj
===================================================================
--- PCbuild9/pythoncore.vcproj (revision 59069)
+++ PCbuild9/pythoncore.vcproj (working copy)
@@ -356,14 +356,10 @@
>
</File>
<File
- RelativePath="..\Include\bytes_methods.h"
+ RelativePath="..\Include\bufferobject.h"
>
</File>
<File
- RelativePath="..\Include\bytesobject.h"
- >
- </File>
- <File
RelativePath="..\Include\cellobject.h"
>
</File>
@@ -684,15 +680,15 @@
>
</File>
<File
- RelativePath="..\Modules\_fileio.c"
+ RelativePath="..\Modules\_functoolsmodule.c"
>
</File>
<File
- RelativePath="..\Modules\_functoolsmodule.c"
+ RelativePath="..\Modules\_heapqmodule.c"
>
</File>
<File
- RelativePath="..\Modules\_heapqmodule.c"
+ RelativePath="..\Modules\_hotshot.c"
>
</File>
<File
@@ -728,10 +724,6 @@
>
</File>
<File
- RelativePath="..\Modules\atexitmodule.c"
- >
- </File>
- <File
RelativePath="..\Modules\audioop.c"
>
</File>
@@ -744,6 +736,10 @@
>
</File>
<File
+ RelativePath="..\Modules\cPickle.c"
+ >
+ </File>
+ <File
RelativePath="..\Modules\cStringIO.c"
>
</File>
@@ -760,6 +756,10 @@
>
</File>
<File
+ RelativePath="..\Modules\imageop.c"
+ >
+ </File>
+ <File
RelativePath="..\Modules\itertoolsmodule.c"
>
</File>
@@ -772,6 +772,14 @@
>
</File>
<File
+ RelativePath="..\Modules\md5.c"
+ >
+ </File>
+ <File
+ RelativePath="..\Modules\md5.h"
+ >
+ </File>
+ <File
RelativePath="..\Modules\md5module.c"
>
</File>
@@ -800,15 +808,15 @@
>
</File>
<File
- RelativePath="..\Modules\sha1module.c"
+ RelativePath="..\Modules\sha256module.c"
>
</File>
<File
- RelativePath="..\Modules\sha256module.c"
+ RelativePath="..\Modules\sha512module.c"
>
</File>
<File
- RelativePath="..\Modules\sha512module.c"
+ RelativePath="..\Modules\shamodule.c"
>
</File>
<File
@@ -816,6 +824,10 @@
>
</File>
<File
+ RelativePath="..\Modules\stropmodule.c"
+ >
+ </File>
+ <File
RelativePath="..\Modules\symtablemodule.c"
>
</File>
@@ -1028,14 +1040,10 @@
>
</File>
<File
- RelativePath="..\Objects\bytes_methods.c"
+ RelativePath="..\Objects\bufferobject.c"
>
</File>
<File
- RelativePath="..\Objects\bytesobject.c"
- >
- </File>
- <File
RelativePath="..\Objects\cellobject.c"
>
</File>
@@ -1104,6 +1112,10 @@
>
</File>
<File
+ RelativePath="..\Objects\intobject.c"
+ >
+ </File>
+ <File
RelativePath="..\Objects\iterobject.c"
>
</File>
@@ -1116,10 +1128,6 @@
>
</File>
<File
- RelativePath="..\Objects\memoryobject.c"
- >
- </File>
- <File
RelativePath="..\Objects\methodobject.c"
>
</File>
@@ -1324,10 +1332,6 @@
>
</File>
<File
- RelativePath="..\Python\formatter_unicode.c"
- >
- </File>
- <File
RelativePath="..\Python\frozen.c"
>
</File>
Index: PCbuild9/pyproject.vsprops
===================================================================
--- Python/structmember.c (revision 59011)
+++ Python/structmember.c (working copy)
@@ -172,7 +172,7 @@
PyErr_SetString(PyExc_TypeError, "readonly attribute");
return -1;
}
- if ((l->flags & WRITE_RESTRICTED) && PyEval_GetRestricted()) {
+ if ((l->flags & PY_WRITE_RESTRICTED) && PyEval_GetRestricted()) {
PyErr_SetString(PyExc_RuntimeError, "restricted attribute");
return -1;
}
_______________________________________________
Python-bugs-list mailing list
Unsubscribe:
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com