Rev 4748: On Windows w/ Python2.5 PyObject_GenericGetAttr is an external DLL function, in http://bazaar.launchpad.net/~jameinel/bzr/2.1-not-static-initializer
John Arbash Meinel
john at arbash-meinel.com
Thu Oct 15 17:18:59 BST 2009
At http://bazaar.launchpad.net/~jameinel/bzr/2.1-not-static-initializer
------------------------------------------------------------
revno: 4748
revision-id: john at arbash-meinel.com-20091015161847-3l2t2hqz2tw3lut0
parent: pqm at pqm.ubuntu.com-20091015064821-bqmmhfto72csm1x7
committer: John Arbash Meinel <john at arbash-meinel.com>
branch nick: 2.1-not-static-initializer
timestamp: Thu 2009-10-15 11:18:47 -0500
message:
On Windows w/ Python2.5 PyObject_GenericGetAttr is an external DLL function,
thus you cannot set the value statically.
I don't know why it is a static value with python 2.6, but this change is needed to
compile with python2.5 on Windows.
-------------- next part --------------
=== modified file 'bzrlib/_static_tuple_c.c'
--- a/bzrlib/_static_tuple_c.c 2009-10-12 21:44:27 +0000
+++ b/bzrlib/_static_tuple_c.c 2009-10-15 16:18:47 +0000
@@ -604,7 +604,7 @@
(hashfunc)StaticTuple_hash, /* tp_hash */
0, /* tp_call */
0, /* tp_str */
- PyObject_GenericGetAttr, /* tp_getattro */
+ 0, /* tp_getattro */
0, /* tp_setattro */
0, /* tp_as_buffer */
Py_TPFLAGS_DEFAULT, /* tp_flags*/
@@ -739,6 +739,7 @@
{
PyObject* m;
+ StaticTuple_Type.tp_getattro = PyObject_GenericGetAttr;
if (PyType_Ready(&StaticTuple_Type) < 0)
return;
More information about the bazaar-commits
mailing list