diff options
-rw-r--r-- | appveyor.yml | 26 | ||||
-rw-r--r-- | src/zope/security/proxy.py | 6 |
2 files changed, 30 insertions, 2 deletions
diff --git a/appveyor.yml b/appveyor.yml new file mode 100644 index 0000000..7bcc4c5 --- /dev/null +++ b/appveyor.yml @@ -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! 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): |