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
7762e4d3
Commit
7762e4d3
authored
Jul 09, 2018
by
Benjamin Peterson
Committed by
GitHub
Jul 09, 2018
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
prefix internal sqlite symbols with _pysqlite_ (GH-8215)
parent
d6d44327
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
19 additions
and
19 deletions
+19
-19
Modules/_sqlite/connection.c
Modules/_sqlite/connection.c
+8
-8
Modules/_sqlite/cursor.c
Modules/_sqlite/cursor.c
+2
-2
Modules/_sqlite/module.c
Modules/_sqlite/module.c
+7
-7
Modules/_sqlite/module.h
Modules/_sqlite/module.h
+2
-2
No files found.
Modules/_sqlite/connection.c
View file @
7762e4d3
...
@@ -617,7 +617,7 @@ void _pysqlite_func_callback(sqlite3_context* context, int argc, sqlite3_value**
...
@@ -617,7 +617,7 @@ void _pysqlite_func_callback(sqlite3_context* context, int argc, sqlite3_value**
Py_DECREF
(
py_retval
);
Py_DECREF
(
py_retval
);
}
}
if
(
!
ok
)
{
if
(
!
ok
)
{
if
(
_enable_callback_tracebacks
)
{
if
(
_
pysqlite_
enable_callback_tracebacks
)
{
PyErr_Print
();
PyErr_Print
();
}
else
{
}
else
{
PyErr_Clear
();
PyErr_Clear
();
...
@@ -649,7 +649,7 @@ static void _pysqlite_step_callback(sqlite3_context *context, int argc, sqlite3_
...
@@ -649,7 +649,7 @@ static void _pysqlite_step_callback(sqlite3_context *context, int argc, sqlite3_
if
(
PyErr_Occurred
())
{
if
(
PyErr_Occurred
())
{
*
aggregate_instance
=
0
;
*
aggregate_instance
=
0
;
if
(
_enable_callback_tracebacks
)
{
if
(
_
pysqlite_
enable_callback_tracebacks
)
{
PyErr_Print
();
PyErr_Print
();
}
else
{
}
else
{
PyErr_Clear
();
PyErr_Clear
();
...
@@ -673,7 +673,7 @@ static void _pysqlite_step_callback(sqlite3_context *context, int argc, sqlite3_
...
@@ -673,7 +673,7 @@ static void _pysqlite_step_callback(sqlite3_context *context, int argc, sqlite3_
Py_DECREF
(
args
);
Py_DECREF
(
args
);
if
(
!
function_result
)
{
if
(
!
function_result
)
{
if
(
_enable_callback_tracebacks
)
{
if
(
_
pysqlite_
enable_callback_tracebacks
)
{
PyErr_Print
();
PyErr_Print
();
}
else
{
}
else
{
PyErr_Clear
();
PyErr_Clear
();
...
@@ -723,7 +723,7 @@ void _pysqlite_final_callback(sqlite3_context* context)
...
@@ -723,7 +723,7 @@ void _pysqlite_final_callback(sqlite3_context* context)
Py_DECREF
(
function_result
);
Py_DECREF
(
function_result
);
}
}
if
(
!
ok
)
{
if
(
!
ok
)
{
if
(
_enable_callback_tracebacks
)
{
if
(
_
pysqlite_
enable_callback_tracebacks
)
{
PyErr_Print
();
PyErr_Print
();
}
else
{
}
else
{
PyErr_Clear
();
PyErr_Clear
();
...
@@ -907,7 +907,7 @@ static int _authorizer_callback(void* user_arg, int action, const char* arg1, co
...
@@ -907,7 +907,7 @@ static int _authorizer_callback(void* user_arg, int action, const char* arg1, co
ret
=
PyObject_CallFunction
((
PyObject
*
)
user_arg
,
"issss"
,
action
,
arg1
,
arg2
,
dbname
,
access_attempt_source
);
ret
=
PyObject_CallFunction
((
PyObject
*
)
user_arg
,
"issss"
,
action
,
arg1
,
arg2
,
dbname
,
access_attempt_source
);
if
(
ret
==
NULL
)
{
if
(
ret
==
NULL
)
{
if
(
_enable_callback_tracebacks
)
if
(
_
pysqlite_
enable_callback_tracebacks
)
PyErr_Print
();
PyErr_Print
();
else
else
PyErr_Clear
();
PyErr_Clear
();
...
@@ -918,7 +918,7 @@ static int _authorizer_callback(void* user_arg, int action, const char* arg1, co
...
@@ -918,7 +918,7 @@ static int _authorizer_callback(void* user_arg, int action, const char* arg1, co
if
(
PyLong_Check
(
ret
))
{
if
(
PyLong_Check
(
ret
))
{
rc
=
_PyLong_AsInt
(
ret
);
rc
=
_PyLong_AsInt
(
ret
);
if
(
rc
==
-
1
&&
PyErr_Occurred
())
{
if
(
rc
==
-
1
&&
PyErr_Occurred
())
{
if
(
_enable_callback_tracebacks
)
if
(
_
pysqlite_
enable_callback_tracebacks
)
PyErr_Print
();
PyErr_Print
();
else
else
PyErr_Clear
();
PyErr_Clear
();
...
@@ -945,7 +945,7 @@ static int _progress_handler(void* user_arg)
...
@@ -945,7 +945,7 @@ static int _progress_handler(void* user_arg)
ret
=
_PyObject_CallNoArg
((
PyObject
*
)
user_arg
);
ret
=
_PyObject_CallNoArg
((
PyObject
*
)
user_arg
);
if
(
!
ret
)
{
if
(
!
ret
)
{
if
(
_enable_callback_tracebacks
)
{
if
(
_
pysqlite_
enable_callback_tracebacks
)
{
PyErr_Print
();
PyErr_Print
();
}
else
{
}
else
{
PyErr_Clear
();
PyErr_Clear
();
...
@@ -980,7 +980,7 @@ static void _trace_callback(void* user_arg, const char* statement_string)
...
@@ -980,7 +980,7 @@ static void _trace_callback(void* user_arg, const char* statement_string)
if
(
ret
)
{
if
(
ret
)
{
Py_DECREF
(
ret
);
Py_DECREF
(
ret
);
}
else
{
}
else
{
if
(
_enable_callback_tracebacks
)
{
if
(
_
pysqlite_
enable_callback_tracebacks
)
{
PyErr_Print
();
PyErr_Print
();
}
else
{
}
else
{
PyErr_Clear
();
PyErr_Clear
();
...
...
Modules/_sqlite/cursor.c
View file @
7762e4d3
...
@@ -109,7 +109,7 @@ PyObject* _pysqlite_get_converter(PyObject* key)
...
@@ -109,7 +109,7 @@ PyObject* _pysqlite_get_converter(PyObject* key)
return
NULL
;
return
NULL
;
}
}
retval
=
PyDict_GetItem
(
converters
,
upcase_key
);
retval
=
PyDict_GetItem
(
_pysqlite_
converters
,
upcase_key
);
Py_DECREF
(
upcase_key
);
Py_DECREF
(
upcase_key
);
return
retval
;
return
retval
;
...
@@ -539,7 +539,7 @@ PyObject* _pysqlite_query_execute(pysqlite_Cursor* self, int multiple, PyObject*
...
@@ -539,7 +539,7 @@ PyObject* _pysqlite_query_execute(pysqlite_Cursor* self, int multiple, PyObject*
if
(
rc
!=
SQLITE_DONE
&&
rc
!=
SQLITE_ROW
)
{
if
(
rc
!=
SQLITE_DONE
&&
rc
!=
SQLITE_ROW
)
{
if
(
PyErr_Occurred
())
{
if
(
PyErr_Occurred
())
{
/* there was an error that occurred in a user-defined callback */
/* there was an error that occurred in a user-defined callback */
if
(
_enable_callback_tracebacks
)
{
if
(
_
pysqlite_
enable_callback_tracebacks
)
{
PyErr_Print
();
PyErr_Print
();
}
else
{
}
else
{
PyErr_Clear
();
PyErr_Clear
();
...
...
Modules/_sqlite/module.c
View file @
7762e4d3
...
@@ -46,8 +46,8 @@ PyObject *pysqlite_IntegrityError = NULL;
...
@@ -46,8 +46,8 @@ PyObject *pysqlite_IntegrityError = NULL;
PyObject
*
pysqlite_DataError
=
NULL
;
PyObject
*
pysqlite_DataError
=
NULL
;
PyObject
*
pysqlite_NotSupportedError
=
NULL
;
PyObject
*
pysqlite_NotSupportedError
=
NULL
;
PyObject
*
converters
=
NULL
;
PyObject
*
_pysqlite_
converters
=
NULL
;
int
_enable_callback_tracebacks
=
0
;
int
_
pysqlite_
enable_callback_tracebacks
=
0
;
int
pysqlite_BaseTypeAdapted
=
0
;
int
pysqlite_BaseTypeAdapted
=
0
;
static
PyObject
*
module_connect
(
PyObject
*
self
,
PyObject
*
args
,
PyObject
*
static
PyObject
*
module_connect
(
PyObject
*
self
,
PyObject
*
args
,
PyObject
*
...
@@ -204,7 +204,7 @@ static PyObject* module_register_converter(PyObject* self, PyObject* args)
...
@@ -204,7 +204,7 @@ static PyObject* module_register_converter(PyObject* self, PyObject* args)
goto
error
;
goto
error
;
}
}
if
(
PyDict_SetItem
(
converters
,
name
,
callable
)
!=
0
)
{
if
(
PyDict_SetItem
(
_pysqlite_
converters
,
name
,
callable
)
!=
0
)
{
goto
error
;
goto
error
;
}
}
...
@@ -222,7 +222,7 @@ Registers a converter with pysqlite. Non-standard.");
...
@@ -222,7 +222,7 @@ Registers a converter with pysqlite. Non-standard.");
static
PyObject
*
enable_callback_tracebacks
(
PyObject
*
self
,
PyObject
*
args
)
static
PyObject
*
enable_callback_tracebacks
(
PyObject
*
self
,
PyObject
*
args
)
{
{
if
(
!
PyArg_ParseTuple
(
args
,
"i"
,
&
_enable_callback_tracebacks
))
{
if
(
!
PyArg_ParseTuple
(
args
,
"i"
,
&
_
pysqlite_
enable_callback_tracebacks
))
{
return
NULL
;
return
NULL
;
}
}
...
@@ -236,12 +236,12 @@ Enable or disable callback functions throwing errors to stderr.");
...
@@ -236,12 +236,12 @@ Enable or disable callback functions throwing errors to stderr.");
static
void
converters_init
(
PyObject
*
dict
)
static
void
converters_init
(
PyObject
*
dict
)
{
{
converters
=
PyDict_New
();
_pysqlite_
converters
=
PyDict_New
();
if
(
!
converters
)
{
if
(
!
_pysqlite_
converters
)
{
return
;
return
;
}
}
PyDict_SetItemString
(
dict
,
"converters"
,
converters
);
PyDict_SetItemString
(
dict
,
"converters"
,
_pysqlite_
converters
);
}
}
static
PyMethodDef
module_methods
[]
=
{
static
PyMethodDef
module_methods
[]
=
{
...
...
Modules/_sqlite/module.h
View file @
7762e4d3
...
@@ -42,9 +42,9 @@ extern PyObject* pysqlite_NotSupportedError;
...
@@ -42,9 +42,9 @@ extern PyObject* pysqlite_NotSupportedError;
* functions, that convert the SQL value to the appropriate Python value.
* functions, that convert the SQL value to the appropriate Python value.
* The key is uppercase.
* The key is uppercase.
*/
*/
extern
PyObject
*
converters
;
extern
PyObject
*
_pysqlite_
converters
;
extern
int
_enable_callback_tracebacks
;
extern
int
_
pysqlite_
enable_callback_tracebacks
;
extern
int
pysqlite_BaseTypeAdapted
;
extern
int
pysqlite_BaseTypeAdapted
;
#define PARSE_DECLTYPES 1
#define PARSE_DECLTYPES 1
...
...
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