At http://bzr.arbash-meinel.com/branches/bzr/1.9-dev/msvc_python24

------------------------------------------------------------
revno: 3790
revision-id: [EMAIL PROTECTED]
parent: [EMAIL PROTECTED]
committer: John Arbash Meinel <[EMAIL PROTECTED]>
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.
=== 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

-- 
bazaar-commits mailing list
[email protected]
https://lists.ubuntu.com/mailman/listinfo/bazaar-commits

Reply via email to