Skip to content

Commit

Permalink
Merge pull request #18 from zopefoundation/fix-win64-maybe
Browse files Browse the repository at this point in the history
Fix tests on 64-bit Windows
  • Loading branch information
mgedmin committed Jun 6, 2016
2 parents e947f88 + 066dd25 commit 6292afe
Show file tree
Hide file tree
Showing 2 changed files with 30 additions and 2 deletions.
26 changes: 26 additions & 0 deletions appveyor.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
environment:

matrix:
- python : 27
- python : 27-x64
- python : 33
- python : 33-x64
- python : 34
- python : 34-x64
- python : 35
- python : 35-x64
- { python: 27, PURE_PYTHON: 1 }
- { python: 35, PURE_PYTHON: 1 }

install:
- "SET PATH=C:\\Python%PYTHON%;c:\\Python%PYTHON%\\scripts;%PATH%"
- echo "C:\Program Files\Microsoft SDKs\Windows\v7.1\Bin\SetEnv.cmd" /x64 > "C:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\bin\amd64\vcvars64.bat"
- pip install -e .

build: false

test_script:
- python setup.py -q test -q

on_success:
- echo Build succesful!
6 changes: 4 additions & 2 deletions src/zope/security/proxy.py
Original file line number Diff line number Diff line change
Expand Up @@ -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):
Expand Down

0 comments on commit 6292afe

Please sign in to comment.