Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
B
BTrees
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Kirill Smelkov
BTrees
Commits
9aad620e
Commit
9aad620e
authored
Apr 14, 2016
by
Tres Seaver
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #36 from zopefoundation/fix-appveyor-build
(Try to) fix appveyor build
parents
96e88e11
1879a2af
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
59 additions
and
24 deletions
+59
-24
BTrees/BTreeModuleTemplate.c
BTrees/BTreeModuleTemplate.c
+11
-16
BTrees/intvaluemacros.h
BTrees/intvaluemacros.h
+4
-8
CHANGES.rst
CHANGES.rst
+4
-0
appveyor.yml
appveyor.yml
+40
-0
No files found.
BTrees/BTreeModuleTemplate.c
View file @
9aad620e
...
...
@@ -77,6 +77,7 @@ static void PyVar_Assign(PyObject **v, PyObject *e) { Py_XDECREF(*v); *v=e;}
#error "PY_LONG_LONG required but not defined"
#endif
#ifdef NEED_LONG_LONG_KEYS
static
int
longlong_check
(
PyObject
*
ob
)
{
...
...
@@ -84,15 +85,19 @@ longlong_check(PyObject *ob)
return
1
;
if
(
PyLong_Check
(
ob
))
{
/* check magnitude */
PY_LONG_LONG
val
=
PyLong_AsLongLong
(
ob
);
if
(
val
==
-
1
&&
PyErr_Occurred
())
return
0
;
int
overflow
;
(
void
)
PyLong_AsLongLongAndOverflow
(
ob
,
&
overflow
);
if
(
overflow
)
goto
overflow
;
return
1
;
}
return
0
;
overflow:
PyErr_SetString
(
PyExc_ValueError
,
"longlong_check: long integer out of range"
);
return
0
;
}
#endif
static
PyObject
*
longlong_as_object
(
PY_LONG_LONG
val
)
...
...
@@ -101,10 +106,8 @@ longlong_as_object(PY_LONG_LONG val)
return
PyLong_FromLongLong
(
val
);
return
INT_FROM_LONG
((
long
)
val
);
}
#endif
#ifdef NEED_LONG_LONG_KEYS
static
int
longlong_convert
(
PyObject
*
ob
,
PY_LONG_LONG
*
value
)
{
...
...
@@ -124,18 +127,10 @@ longlong_convert(PyObject *ob, PY_LONG_LONG *value)
else
{
PY_LONG_LONG
val
;
#if PY_VERSION_HEX < 0x02070000
/* check magnitude */
val
=
PyLong_AsLongLong
(
ob
);
if
(
val
==
-
1
&&
PyErr_Occurred
())
goto
overflow
;
#else
int
overflow
;
val
=
PyLong_AsLongLongAndOverflow
(
ob
,
&
overflow
);
if
(
overflow
)
goto
overflow
;
#endif
(
*
value
)
=
val
;
return
1
;
}
...
...
@@ -143,7 +138,7 @@ overflow:
PyErr_SetString
(
PyExc_ValueError
,
"long integer out of range"
);
return
0
;
}
#endif
#endif
/* NEED_LONG_LONG_SUPPORT */
/* Various kinds of BTree and Bucket structs are instances of
...
...
BTrees/intvaluemacros.h
View file @
9aad620e
...
...
@@ -7,14 +7,10 @@
#define VALUE_PARSE "L"
#define COPY_VALUE_TO_OBJECT(O, K) O=longlong_as_object(K)
#define COPY_VALUE_FROM_ARG(TARGET, ARG, STATUS) \
if (INT_CHECK(ARG)) TARGET=INT_AS_LONG(ARG); else \
if (longlong_check(ARG)) TARGET=PyLong_AsLongLong(ARG); else \
if (PyLong_Check(ARG)) { \
PyErr_SetString(PyExc_ValueError, "long integer out of range"); \
(STATUS)=0; (TARGET)=0; } \
else { \
PyErr_SetString(PyExc_TypeError, "expected integer value"); \
(STATUS)=0; (TARGET)=0; }
if (!longlong_convert((ARG), &TARGET)) \
{ \
(STATUS)=0; (TARGET)=0; \
}
#else
#define VALUE_TYPE int
#define VALUE_PARSE "i"
...
...
CHANGES.rst
View file @
9aad620e
...
...
@@ -4,6 +4,10 @@
4.3.0 (TBD)
-----------
- Fix unexpected ``OverflowError`` when passing 64bit values to long
keys / values on Win64. See:
https://github.com/zopefoundation/BTrees/issues/32
- When testing ``PURE_PYTHON`` environments under ``tox``, avoid poisoning
the user's global wheel cache.
...
...
appveyor.yml
0 → 100644
View file @
9aad620e
environment
:
password
:
secure
:
RtpeKCle25vCixaUcJBu6Q==
matrix
:
-
python
:
27
-
python
:
27-x64
-
python
:
33
-
python
:
33-x64
-
python
:
34
-
python
:
34-x64
-
python
:
35
-
python
:
35-x64
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!
deploy_script
:
-
echo [distutils] > %USERPROFILE%\\.pypirc
-
echo index-servers = >> %USERPROFILE%\\.pypirc
-
echo pypi >> %USERPROFILE%\\.pypirc
-
echo [pypi] >> %USERPROFILE%\\.pypirc
-
echo repository=https://pypi.python.org/pypi >> %USERPROFILE%\\.pypirc
-
echo username=zope.wheelbuilder >> %USERPROFILE%\\.pypirc
-
echo password=%password% >> %USERPROFILE%\\.pypirc
-
set HOME=%USERPROFILE%
-
pip install wheel twine
-
ps
:
if($env:APPVEYOR_REPO_TAG -eq $TRUE) { python -W ignore setup.py bdist_wheel bdist_egg; twine upload dist/* }
deploy
:
on
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment