Rev 2670: (Lukáš Lalinský) Add a special header for intptr_t for MSVC which doesn't have it in the standard place in file:///home/pqm/archives/thelove/bzr/%2Btrunk/

Canonical.com Patch Queue Manager pqm at pqm.ubuntu.com
Thu Aug 2 23:13:40 BST 2007


At file:///home/pqm/archives/thelove/bzr/%2Btrunk/

------------------------------------------------------------
revno: 2670
revision-id: pqm at pqm.ubuntu.com-20070802221338-9333q05a8caaciwo
parent: pqm at pqm.ubuntu.com-20070802202308-j02scq74y5uuzpn2
parent: john at arbash-meinel.com-20070802210051-lqpg4mgbeyl3h2ld
committer: Canonical.com Patch Queue Manager <pqm at pqm.ubuntu.com>
branch nick: +trunk
timestamp: Thu 2007-08-02 23:13:38 +0100
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
    ------------------------------------------------------------
    revno: 2668.1.1
    merged: 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 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