Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
C
cpython
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
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Kirill Smelkov
cpython
Commits
a9217a42
Commit
a9217a42
authored
Apr 28, 2013
by
Serhiy Storchaka
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Issue #17857: Prevent build failures with pre-3.5.0 versions of sqlite3,
such as was shipped with Centos 5 and Mac OS X 10.4.
parent
ba2f8be4
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
13 additions
and
7 deletions
+13
-7
Misc/NEWS
Misc/NEWS
+6
-0
Modules/_sqlite/cursor.c
Modules/_sqlite/cursor.c
+1
-1
Modules/_sqlite/util.c
Modules/_sqlite/util.c
+4
-4
Modules/_sqlite/util.h
Modules/_sqlite/util.h
+2
-2
No files found.
Misc/NEWS
View file @
a9217a42
...
@@ -19,6 +19,12 @@ Library
...
@@ -19,6 +19,12 @@ Library
- Issue #15535: Fix namedtuple pickles which were picking up the OrderedDict
- Issue #15535: Fix namedtuple pickles which were picking up the OrderedDict
instead of just the underlying tuple.
instead of just the underlying tuple.
Build
-----
- Issue #17857: Prevent build failures with pre-3.5.0 versions of sqlite3,
such as was shipped with Centos 5 and Mac OS X 10.4.
Tests
Tests
-----
-----
...
...
Modules/_sqlite/cursor.c
View file @
a9217a42
...
@@ -716,7 +716,7 @@ PyObject* _pysqlite_query_execute(pysqlite_Cursor* self, int multiple, PyObject*
...
@@ -716,7 +716,7 @@ PyObject* _pysqlite_query_execute(pysqlite_Cursor* self, int multiple, PyObject*
Py_DECREF
(
self
->
lastrowid
);
Py_DECREF
(
self
->
lastrowid
);
if
(
!
multiple
&&
statement_type
==
STATEMENT_INSERT
)
{
if
(
!
multiple
&&
statement_type
==
STATEMENT_INSERT
)
{
sqlite
3
_int64
lastrowid
;
sqlite_int64
lastrowid
;
Py_BEGIN_ALLOW_THREADS
Py_BEGIN_ALLOW_THREADS
lastrowid
=
sqlite3_last_insert_rowid
(
self
->
connection
->
db
);
lastrowid
=
sqlite3_last_insert_rowid
(
self
->
connection
->
db
);
Py_END_ALLOW_THREADS
Py_END_ALLOW_THREADS
...
...
Modules/_sqlite/util.c
View file @
a9217a42
...
@@ -111,7 +111,7 @@ int _pysqlite_seterror(sqlite3* db, sqlite3_stmt* st)
...
@@ -111,7 +111,7 @@ int _pysqlite_seterror(sqlite3* db, sqlite3_stmt* st)
#endif
#endif
PyObject
*
PyObject
*
_pysqlite_long_from_int64
(
sqlite
3
_int64
value
)
_pysqlite_long_from_int64
(
sqlite_int64
value
)
{
{
#ifdef HAVE_LONG_LONG
#ifdef HAVE_LONG_LONG
# if SIZEOF_LONG_LONG < 8
# if SIZEOF_LONG_LONG < 8
...
@@ -135,7 +135,7 @@ _pysqlite_long_from_int64(sqlite3_int64 value)
...
@@ -135,7 +135,7 @@ _pysqlite_long_from_int64(sqlite3_int64 value)
return
PyLong_FromLong
(
value
);
return
PyLong_FromLong
(
value
);
}
}
sqlite
3
_int64
sqlite_int64
_pysqlite_long_as_int64
(
PyObject
*
py_val
)
_pysqlite_long_as_int64
(
PyObject
*
py_val
)
{
{
int
overflow
;
int
overflow
;
...
@@ -158,8 +158,8 @@ _pysqlite_long_as_int64(PyObject * py_val)
...
@@ -158,8 +158,8 @@ _pysqlite_long_as_int64(PyObject * py_val)
#endif
#endif
return
value
;
return
value
;
}
}
else
if
(
sizeof
(
value
)
<
sizeof
(
sqlite
3
_int64
))
{
else
if
(
sizeof
(
value
)
<
sizeof
(
sqlite_int64
))
{
sqlite
3
_int64
int64val
;
sqlite_int64
int64val
;
if
(
_PyLong_AsByteArray
((
PyLongObject
*
)
py_val
,
if
(
_PyLong_AsByteArray
((
PyLongObject
*
)
py_val
,
(
unsigned
char
*
)
&
int64val
,
sizeof
(
int64val
),
(
unsigned
char
*
)
&
int64val
,
sizeof
(
int64val
),
IS_LITTLE_ENDIAN
,
1
/* signed */
)
>=
0
)
{
IS_LITTLE_ENDIAN
,
1
/* signed */
)
>=
0
)
{
...
...
Modules/_sqlite/util.h
View file @
a9217a42
...
@@ -36,7 +36,7 @@ int pysqlite_step(sqlite3_stmt* statement, pysqlite_Connection* connection);
...
@@ -36,7 +36,7 @@ int pysqlite_step(sqlite3_stmt* statement, pysqlite_Connection* connection);
*/
*/
int
_pysqlite_seterror
(
sqlite3
*
db
,
sqlite3_stmt
*
st
);
int
_pysqlite_seterror
(
sqlite3
*
db
,
sqlite3_stmt
*
st
);
PyObject
*
_pysqlite_long_from_int64
(
sqlite
3
_int64
value
);
PyObject
*
_pysqlite_long_from_int64
(
sqlite_int64
value
);
sqlite
3
_int64
_pysqlite_long_as_int64
(
PyObject
*
value
);
sqlite_int64
_pysqlite_long_as_int64
(
PyObject
*
value
);
#endif
#endif
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