Rev 2669: (Lukáš Lalinský) Add a special header for intptr_t for MSVC which doesn't have it in the standard place in http://bzr.arbash-meinel.com/branches/bzr/jam-integration

John Arbash Meinel john at arbash-meinel.com
Thu Aug 2 22:00:40 BST 2007


At http://bzr.arbash-meinel.com/branches/bzr/jam-integration

------------------------------------------------------------
revno: 2669
revision-id: john at arbash-meinel.com-20070802210051-lqpg4mgbeyl3h2ld
parent: pqm at pqm.ubuntu.com-20070802072205-gjk1eev6rlw7ght8
committer: John Arbash Meinel <john at arbash-meinel.com>
branch nick: jam-integration
timestamp: Thu 2007-08-02 16:00:51 -0500
message:
  (Lukáš Lalinský) Add a special header for intptr_t for MSVC which doesn't have it in the standard place
added:
  bzrlib/_dirstate_helpers_c.h   _dirstate_helpers_c.-20070802205935-hqo9yzuzjix271dd-1
modified:
  bzrlib/_dirstate_helpers_c.pyx dirstate_helpers.pyx-20070503201057-u425eni465q4idwn-3
-------------- next part --------------
=== added file 'bzrlib/_dirstate_helpers_c.h'
--- a/bzrlib/_dirstate_helpers_c.h	1970-01-01 00:00:00 +0000
+++ b/bzrlib/_dirstate_helpers_c.h	2007-08-02 21:00:51 +0000
@@ -0,0 +1,11 @@
+#ifndef _DIRSTATE_HELPERS_C_H
+#define _DIRSTATE_HELPERS_C_H
+
+/* for intptr_t */
+#ifdef _MSC_VER
+#include <io.h>
+#else
+#include <stdint.h>
+#endif
+
+#endif

=== modified file 'bzrlib/_dirstate_helpers_c.pyx'
--- a/bzrlib/_dirstate_helpers_c.pyx	2007-07-20 17:01:36 +0000
+++ b/bzrlib/_dirstate_helpers_c.pyx	2007-08-02 21:00:51 +0000
@@ -32,7 +32,7 @@
 cdef extern from *:
     ctypedef unsigned long size_t
 
-cdef extern from "stdint.h":
+cdef extern from "_dirstate_helpers_c.h":
     ctypedef int intptr_t
 
 
@@ -108,7 +108,7 @@
     found = _my_memrchr(_s, _c[0], length)
     if found == NULL:
         return None
-    return found - _s
+    return <char*>found - <char*>_s
 
 
 cdef int _is_aligned(void *ptr):



More information about the bazaar-commits mailing list