Rev 3790: Switch from using cdef readonly __int64 to using a property. in http://bzr.arbash-meinel.com/branches/bzr/1.9-dev/msvc_python24
John Arbash Meinel
john at arbash-meinel.com
Tue Oct 21 16:38:32 BST 2008
At http://bzr.arbash-meinel.com/branches/bzr/1.9-dev/msvc_python24
------------------------------------------------------------
revno: 3790
revision-id: john at arbash-meinel.com-20081021153817-9uvj763ty2k9cm1q
parent: john at arbash-meinel.com-20081021153644-0drssjf3k1cx1sgq
committer: John Arbash Meinel <john at arbash-meinel.com>
branch nick: msvc_python24
timestamp: Tue 2008-10-21 10:38:17 -0500
message:
Switch from using cdef readonly __int64 to using a property.
It seems that python2.4 can't handle T_LONGLONG as an implicitly exported
structure member. So instead, we just export it via property which seems
to work just fine.
-------------- next part --------------
=== modified file 'bzrlib/_walkdirs_win32.pyx'
--- a/bzrlib/_walkdirs_win32.pyx 2008-09-26 05:14:51 +0000
+++ b/bzrlib/_walkdirs_win32.pyx 2008-10-21 15:38:17 +0000
@@ -81,7 +81,14 @@
cdef readonly double st_ctime
cdef readonly double st_mtime
cdef readonly double st_atime
- cdef readonly __int64 st_size
+ # We can't just declare this as 'readonly' because python2.4 doesn't define
+ # T_LONGLONG as a structure member. So instead we just use a property that
+ # will convert it correctly anyway.
+ cdef __int64 _st_size
+
+ property st_size:
+ def __get__(self):
+ return self._st_size
# os.stat always returns 0, so we hard code it here
cdef readonly int st_dev
More information about the bazaar-commits
mailing list