Skip to content

Commit 8555e2e

Browse files
committed
Rename macro to PY_SQLITE_ENABLE_LOAD_EXTENSION
1 parent 9b05e68 commit 8555e2e

File tree

7 files changed

+13
-13
lines changed

7 files changed

+13
-13
lines changed
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
``configure --enable-loadable-sqlite-extensions`` is now handled by new ``PY_SQLITE_ENABLE_LOADABLE_EXTENSION`` instead of logic in setup.py.
1+
``configure --enable-loadable-sqlite-extensions`` is now handled by new ``PY_SQLITE_ENABLE_LOAD_EXTENSION`` macro instead of logic in setup.py.

Modules/_sqlite/clinic/connection.c.h

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -367,7 +367,7 @@ pysqlite_connection_set_trace_callback(pysqlite_Connection *self, PyTypeObject *
367367
return return_value;
368368
}
369369

370-
#if defined(PY_SQLITE_ENABLE_LOADABLE_EXTENSION)
370+
#if defined(PY_SQLITE_ENABLE_LOAD_EXTENSION)
371371

372372
PyDoc_STRVAR(pysqlite_connection_enable_load_extension__doc__,
373373
"enable_load_extension($self, enable, /)\n"
@@ -398,9 +398,9 @@ pysqlite_connection_enable_load_extension(pysqlite_Connection *self, PyObject *a
398398
return return_value;
399399
}
400400

401-
#endif /* defined(PY_SQLITE_ENABLE_LOADABLE_EXTENSION) */
401+
#endif /* defined(PY_SQLITE_ENABLE_LOAD_EXTENSION) */
402402

403-
#if defined(PY_SQLITE_ENABLE_LOADABLE_EXTENSION)
403+
#if defined(PY_SQLITE_ENABLE_LOAD_EXTENSION)
404404

405405
PyDoc_STRVAR(pysqlite_connection_load_extension__doc__,
406406
"load_extension($self, name, /)\n"
@@ -440,7 +440,7 @@ pysqlite_connection_load_extension(pysqlite_Connection *self, PyObject *arg)
440440
return return_value;
441441
}
442442

443-
#endif /* defined(PY_SQLITE_ENABLE_LOADABLE_EXTENSION) */
443+
#endif /* defined(PY_SQLITE_ENABLE_LOAD_EXTENSION) */
444444

445445
PyDoc_STRVAR(pysqlite_connection_execute__doc__,
446446
"execute($self, sql, parameters=<unrepresentable>, /)\n"
@@ -834,4 +834,4 @@ getlimit(pysqlite_Connection *self, PyObject *arg)
834834
#ifndef PYSQLITE_CONNECTION_LOAD_EXTENSION_METHODDEF
835835
#define PYSQLITE_CONNECTION_LOAD_EXTENSION_METHODDEF
836836
#endif /* !defined(PYSQLITE_CONNECTION_LOAD_EXTENSION_METHODDEF) */
837-
/*[clinic end generated code: output=38de40d9c6fa2220 input=a9049054013a1b77]*/
837+
/*[clinic end generated code: output=d71bf16bef67878f input=a9049054013a1b77]*/

Modules/_sqlite/connection.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1225,7 +1225,7 @@ pysqlite_connection_set_trace_callback_impl(pysqlite_Connection *self,
12251225
Py_RETURN_NONE;
12261226
}
12271227

1228-
#ifdef PY_SQLITE_ENABLE_LOADABLE_EXTENSION
1228+
#ifdef PY_SQLITE_ENABLE_LOAD_EXTENSION
12291229
/*[clinic input]
12301230
_sqlite3.Connection.enable_load_extension as pysqlite_connection_enable_load_extension
12311231

configure

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10922,7 +10922,7 @@ $as_echo "$enable_loadable_sqlite_extensions" >&6; }
1092210922
if test "x$enable_loadable_sqlite_extensions" = xyes; then :
1092310923

1092410924

10925-
$as_echo "#define PY_SQLITE_ENABLE_LOADABLE_EXTENSION 1" >>confdefs.h
10925+
$as_echo "#define PY_SQLITE_ENABLE_LOAD_EXTENSION 1" >>confdefs.h
1092610926

1092710927

1092810928
fi

configure.ac

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3203,8 +3203,8 @@ AC_ARG_ENABLE(loadable-sqlite-extensions,
32033203
AC_MSG_RESULT($enable_loadable_sqlite_extensions)
32043204

32053205
AS_VAR_IF([enable_loadable_sqlite_extensions], [yes], [
3206-
AC_DEFINE(PY_SQLITE_ENABLE_LOADABLE_EXTENSION, 1,
3207-
[Define to 1 to build sqlite module with loadable extensions.])
3206+
AC_DEFINE(PY_SQLITE_ENABLE_LOAD_EXTENSION, 1,
3207+
[Define to 1 to build the sqlite module with loadable extensions support.])
32083208
])
32093209

32103210
# Check for --with-tcltk-includes=path and --with-tcltk-libs=path

pyconfig.h.in

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1395,8 +1395,8 @@
13951395
/* Define to printf format modifier for Py_ssize_t */
13961396
#undef PY_FORMAT_SIZE_T
13971397

1398-
/* Define to 1 to build sqlite module with loadable extensions. */
1399-
#undef PY_SQLITE_ENABLE_LOADABLE_EXTENSION
1398+
/* Define to 1 to build the sqlite module with loadable extensions support. */
1399+
#undef PY_SQLITE_ENABLE_LOAD_EXTENSION
14001400

14011401
/* Default cipher suites list for ssl module. 1: Python's preferred selection,
14021402
2: leave OpenSSL defaults untouched, 0: custom string */

setup.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1605,7 +1605,7 @@ def detect_sqlite(self):
16051605
if (
16061606
MACOS and
16071607
sqlite_incdir == os.path.join(MACOS_SDK_ROOT, "usr/include") and
1608-
sysconfig.get_config_var("PY_SQLITE_ENABLE_LOADABLE_EXTENSION")
1608+
sysconfig.get_config_var("PY_SQLITE_ENABLE_LOAD_EXTENSION")
16091609
):
16101610
raise DistutilsError("System version of SQLite does not support loadable extensions")
16111611

0 commit comments

Comments
 (0)