summaryrefslogtreecommitdiff
path: root/src/zope/security/proxy.py
diff options
context:
space:
mode:
Diffstat (limited to 'src/zope/security/proxy.py')
-rw-r--r--src/zope/security/proxy.py6
1 files changed, 4 insertions, 2 deletions
diff --git a/src/zope/security/proxy.py b/src/zope/security/proxy.py
index ccfd111..d7f12e2 100644
--- a/src/zope/security/proxy.py
+++ b/src/zope/security/proxy.py
@@ -51,10 +51,12 @@ def _fmt_address(obj):
# Try to replicate PyString_FromString("%p", obj), which actually uses
# the platform sprintf(buf, "%p", obj), which we cannot access from Python
# directly (and ctypes seems like overkill).
- if sys.platform == 'win32':
+ if sys.platform != 'win32':
+ return '0x%0x' % id(obj)
+ elif sys.maxsize < 2**32:
return '0x%08X' % id(obj)
else:
- return '0x%0x' % id(obj)
+ return '0x%016X' % id(obj)
class ProxyPy(PyProxyBase):