Rev 5038: (mbp) Don't show pointer in safe_string_from_size error in file:///home/pqm/archives/thelove/bzr/%2Btrunk/

Canonical.com Patch Queue Manager pqm at pqm.ubuntu.com
Wed Feb 17 07:46:15 GMT 2010


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

------------------------------------------------------------
revno: 5038 [merge]
revision-id: pqm at pqm.ubuntu.com-20100217074611-0yifopv5mebb3aq0
parent: pqm at pqm.ubuntu.com-20100217055715-5b8xt6dfbov0bbgz
parent: mbp at sourcefrog.net-20100217062537-o7qkrvooff86v1iu
committer: Canonical.com Patch Queue Manager <pqm at pqm.ubuntu.com>
branch nick: +trunk
timestamp: Wed 2010-02-17 07:46:11 +0000
message:
  (mbp) Don't show pointer in safe_string_from_size error
modified:
  bzrlib/_dirstate_helpers_pyx.pyx dirstate_helpers.pyx-20070503201057-u425eni465q4idwn-3
=== modified file 'bzrlib/_dirstate_helpers_pyx.pyx'
--- a/bzrlib/_dirstate_helpers_pyx.pyx	2010-01-05 07:22:59 +0000
+++ b/bzrlib/_dirstate_helpers_pyx.pyx	2010-02-17 06:25:37 +0000
@@ -1,4 +1,4 @@
-# Copyright (C) 2007, 2008 Canonical Ltd
+# Copyright (C) 2007, 2008, 2010 Canonical Ltd
 #
 # This program is free software; you can redistribute it and/or modify
 # it under the terms of the GNU General Public License as published by
@@ -156,12 +156,12 @@
         return None
     return <char*>found - <char*>_s
 
+
 cdef object safe_string_from_size(char *s, Py_ssize_t size):
     if size < 0:
-        # XXX: On 64-bit machines the <int> cast causes a C compiler warning.
         raise AssertionError(
-            'tried to create a string with an invalid size: %d @0x%x'
-            % (size, <int>s))
+            'tried to create a string with an invalid size: %d'
+            % (size))
     return PyString_FromStringAndSize(s, size)
 
 




More information about the bazaar-commits mailing list