Rev 2490: Shave off maybe 10% by using the PyString_* macros instead of functions. in http://bzr.arbash-meinel.com/branches/bzr/0.17-dev/dirstate_pyrex

John Arbash Meinel john at arbash-meinel.com
Fri May 4 17:11:33 BST 2007


At http://bzr.arbash-meinel.com/branches/bzr/0.17-dev/dirstate_pyrex

------------------------------------------------------------
revno: 2490
revision-id: john at arbash-meinel.com-20070504161120-wyplkl21ctqbq2ka
parent: john at arbash-meinel.com-20070504160330-jai9q6h8ts1ddb2i
committer: John Arbash Meinel <john at arbash-meinel.com>
branch nick: dirstate_pyrex
timestamp: Fri 2007-05-04 11:11:20 -0500
message:
  Shave off maybe 10% by using the PyString_* macros instead of functions.
modified:
  bzrlib/compiled/dirstate_helpers.pyx dirstate_helpers.pyx-20070503201057-u425eni465q4idwn-3
-------------- next part --------------
=== modified file 'bzrlib/compiled/dirstate_helpers.pyx'
--- a/bzrlib/compiled/dirstate_helpers.pyx	2007-05-04 16:02:16 +0000
+++ b/bzrlib/compiled/dirstate_helpers.pyx	2007-05-04 16:11:20 +0000
@@ -36,9 +36,9 @@
     int PyTuple_CheckExact(object)
 
     char *PyString_AsString(object p)
-    char *PyString_AsString_void "PyString_AsString" (void *p)
+    char *PyString_AS_STRING_void "PyString_AS_STRING" (void *p)
     int PyString_Size(object p)
-    int PyString_Size_void "PyString_Size" (void *p)
+    int PyString_GET_SIZE_void "PyString_GET_SIZE" (void *p)
     int PyString_CheckExact(object p)
 
     void Py_INCREF(object)
@@ -186,8 +186,8 @@
         # cur = dirblocks[_mid][0]
         cur = PyTuple_GetItem_void_void(
                 PyList_GetItem_object_void(dirblocks, _mid), 0)
-        cur_str = PyString_AsString_void(cur)
-        cur_size = PyString_Size_void(cur)
+        cur_str = PyString_AS_STRING_void(cur)
+        cur_size = PyString_GET_SIZE_void(cur)
         if _cmp_dirblock_strings(cur_str, cur_size,
                                  dirname_str, dirname_size) < 0:
             _lo = _mid+1



More information about the bazaar-commits mailing list