[Python-checkins] r59120 - in python/trunk: Include/structmember.h Modules/socketmodule.c Objects/funcobject.c Objects/methodobject.c PCbuild9 PCbuild9/pyproject.vsprops PCbuild9/pythoncore.vcproj Python/structmember.c
christian.heimes
python-checkins at python.org
Thu Nov 22 12:21:17 CET 2007
Author: christian.heimes
Date: Thu Nov 22 12:21:16 2007
New Revision: 59120
Added:
python/trunk/PCbuild9/
- copied from r59119, python/branches/py3k/PCbuild9/
Modified:
python/trunk/Include/structmember.h
python/trunk/Modules/socketmodule.c
python/trunk/Objects/funcobject.c
python/trunk/Objects/methodobject.c
python/trunk/PCbuild9/pyproject.vsprops
python/trunk/PCbuild9/pythoncore.vcproj
python/trunk/Python/structmember.c
Log:
Backport of the PCbuild9 directory from the py3k branch.
I've finished the last task for the PCbuild9 directory today. I don't think there is much left to do. Now you can all play around with the shiny new VS 2008 and try the PGO builds. I was able to get a speed improvement of about 10% on py3k.
Have fun! :)
Modified: python/trunk/Include/structmember.h
==============================================================================
--- python/trunk/Include/structmember.h (original)
+++ python/trunk/Include/structmember.h Thu Nov 22 12:21:16 2007
@@ -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 */
Modified: python/trunk/Modules/socketmodule.c
==============================================================================
--- python/trunk/Modules/socketmodule.c (original)
+++ python/trunk/Modules/socketmodule.c Thu Nov 22 12:21:16 2007
@@ -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
Modified: python/trunk/Objects/funcobject.c
==============================================================================
--- python/trunk/Objects/funcobject.c (original)
+++ python/trunk/Objects/funcobject.c Thu Nov 22 12:21:16 2007
@@ -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 */
};
Modified: python/trunk/Objects/methodobject.c
==============================================================================
--- python/trunk/Objects/methodobject.c (original)
+++ python/trunk/Objects/methodobject.c Thu Nov 22 12:21:16 2007
@@ -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}
};
Modified: python/trunk/PCbuild9/pyproject.vsprops
==============================================================================
--- python/branches/py3k/PCbuild9/pyproject.vsprops (original)
+++ python/trunk/PCbuild9/pyproject.vsprops Thu Nov 22 12:21:16 2007
@@ -38,7 +38,7 @@
/>
<UserMacro
Name="PyDllName"
- Value="python30"
+ Value="python26"
/>
<UserMacro
Name="bsddbDir"
Modified: python/trunk/PCbuild9/pythoncore.vcproj
==============================================================================
--- python/branches/py3k/PCbuild9/pythoncore.vcproj (original)
+++ python/trunk/PCbuild9/pythoncore.vcproj Thu Nov 22 12:21:16 2007
@@ -651,11 +651,7 @@
>
</File>
<File
- RelativePath="..\Include\bytes_methods.h"
- >
- </File>
- <File
- RelativePath="..\Include\bytesobject.h"
+ RelativePath="..\Include\bufferobject.h"
>
</File>
<File
@@ -979,15 +975,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
@@ -1023,10 +1019,6 @@
>
</File>
<File
- RelativePath="..\Modules\atexitmodule.c"
- >
- </File>
- <File
RelativePath="..\Modules\audioop.c"
>
</File>
@@ -1039,6 +1031,10 @@
>
</File>
<File
+ RelativePath="..\Modules\cPickle.c"
+ >
+ </File>
+ <File
RelativePath="..\Modules\cStringIO.c"
>
</File>
@@ -1055,6 +1051,10 @@
>
</File>
<File
+ RelativePath="..\Modules\imageop.c"
+ >
+ </File>
+ <File
RelativePath="..\Modules\itertoolsmodule.c"
>
</File>
@@ -1067,6 +1067,14 @@
>
</File>
<File
+ RelativePath="..\Modules\md5.c"
+ >
+ </File>
+ <File
+ RelativePath="..\Modules\md5.h"
+ >
+ </File>
+ <File
RelativePath="..\Modules\md5module.c"
>
</File>
@@ -1095,15 +1103,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
@@ -1111,6 +1119,10 @@
>
</File>
<File
+ RelativePath="..\Modules\stropmodule.c"
+ >
+ </File>
+ <File
RelativePath="..\Modules\symtablemodule.c"
>
</File>
@@ -1323,11 +1335,7 @@
>
</File>
<File
- RelativePath="..\Objects\bytes_methods.c"
- >
- </File>
- <File
- RelativePath="..\Objects\bytesobject.c"
+ RelativePath="..\Objects\bufferobject.c"
>
</File>
<File
@@ -1399,19 +1407,19 @@
>
</File>
<File
- RelativePath="..\Objects\iterobject.c"
+ RelativePath="..\Objects\intobject.c"
>
</File>
<File
- RelativePath="..\Objects\listobject.c"
+ RelativePath="..\Objects\iterobject.c"
>
</File>
<File
- RelativePath="..\Objects\longobject.c"
+ RelativePath="..\Objects\listobject.c"
>
</File>
<File
- RelativePath="..\Objects\memoryobject.c"
+ RelativePath="..\Objects\longobject.c"
>
</File>
<File
@@ -1619,10 +1627,6 @@
>
</File>
<File
- RelativePath="..\Python\formatter_unicode.c"
- >
- </File>
- <File
RelativePath="..\Python\frozen.c"
>
</File>
Modified: python/trunk/Python/structmember.c
==============================================================================
--- python/trunk/Python/structmember.c (original)
+++ python/trunk/Python/structmember.c Thu Nov 22 12:21:16 2007
@@ -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;
}
More information about the Python-checkins
mailing list