Skip to content

Commit e3bc45e

Browse files
committed
chg version to 2.1.4-pre. chg gen_providers to turn on load_extension for other provider configurations, likely to help with #532
1 parent 387be6f commit e3bc45e

File tree

13 files changed

+100
-26
lines changed

13 files changed

+100
-26
lines changed

Directory.Build.props

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,9 +4,9 @@
44
<Copyright>Copyright 2014-2022 SourceGear, LLC</Copyright>
55
<Company>SourceGear</Company>
66
<Authors>Eric Sink</Authors>
7-
<Version>2.1.2</Version>
8-
<AssemblyVersion>2.1.2.1721</AssemblyVersion>
9-
<FileVersion>2.1.2.1721</FileVersion>
7+
<Version>2.1.4-pre20230105143845</Version>
8+
<AssemblyVersion>2.1.4.1830</AssemblyVersion>
9+
<FileVersion>2.1.4.1830</FileVersion>
1010
<Description>SQLitePCLRaw is a Portable Class Library (PCL) for low-level (raw) access to SQLite</Description>
1111
<ProviderLangVersion>10.0</ProviderLangVersion>
1212
<GenerateAssemblyProductAttribute>false</GenerateAssemblyProductAttribute>

gen_providers/Program.fs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -58,14 +58,14 @@ let main argv =
5858
for s in ["e_sqlite3"; "sqlite3"; ] do
5959
gen_provider s s (Some subname_prenet5_win) "Cdecl" "dllimport" "FEATURE_WIN32DIR/true" "FEATURE_FUNCPTRS/false" "FEATURE_KEY/false" "FEATURE_LOADEXTENSION/false"
6060
gen_provider s s (Some subname_prenet5_notwin) "Cdecl" "dllimport" "FEATURE_WIN32DIR/false" "FEATURE_FUNCPTRS/false" "FEATURE_KEY/false" "FEATURE_LOADEXTENSION/false"
61-
gen_provider s s (Some subname_funcptrs_win) "Cdecl" "dllimport" "FEATURE_WIN32DIR/true" "FEATURE_FUNCPTRS/callingconv" "FEATURE_KEY/false" "FEATURE_LOADEXTENSION/false"
62-
gen_provider s s (Some subname_funcptrs_notwin) "Cdecl" "dllimport" "FEATURE_WIN32DIR/false" "FEATURE_FUNCPTRS/plain" "FEATURE_KEY/false" "FEATURE_LOADEXTENSION/false"
61+
gen_provider s s (Some subname_funcptrs_win) "Cdecl" "dllimport" "FEATURE_WIN32DIR/true" "FEATURE_FUNCPTRS/callingconv" "FEATURE_KEY/false" "FEATURE_LOADEXTENSION/true"
62+
gen_provider s s (Some subname_funcptrs_notwin) "Cdecl" "dllimport" "FEATURE_WIN32DIR/false" "FEATURE_FUNCPTRS/plain" "FEATURE_KEY/false" "FEATURE_LOADEXTENSION/true"
6363

6464
for s in ["e_sqlcipher"; "sqlcipher"; ] do
6565
gen_provider s s (Some subname_prenet5_win) "Cdecl" "dllimport" "FEATURE_WIN32DIR/true" "FEATURE_FUNCPTRS/false" "FEATURE_KEY/true" "FEATURE_LOADEXTENSION/false"
6666
gen_provider s s (Some subname_prenet5_notwin) "Cdecl" "dllimport" "FEATURE_WIN32DIR/false" "FEATURE_FUNCPTRS/false" "FEATURE_KEY/true" "FEATURE_LOADEXTENSION/false"
67-
gen_provider s s (Some subname_funcptrs_win) "Cdecl" "dllimport" "FEATURE_WIN32DIR/true" "FEATURE_FUNCPTRS/callingconv" "FEATURE_KEY/true" "FEATURE_LOADEXTENSION/false"
68-
gen_provider s s (Some subname_funcptrs_notwin) "Cdecl" "dllimport" "FEATURE_WIN32DIR/false" "FEATURE_FUNCPTRS/plain" "FEATURE_KEY/true" "FEATURE_LOADEXTENSION/false"
67+
gen_provider s s (Some subname_funcptrs_win) "Cdecl" "dllimport" "FEATURE_WIN32DIR/true" "FEATURE_FUNCPTRS/callingconv" "FEATURE_KEY/true" "FEATURE_LOADEXTENSION/true"
68+
gen_provider s s (Some subname_funcptrs_notwin) "Cdecl" "dllimport" "FEATURE_WIN32DIR/false" "FEATURE_FUNCPTRS/plain" "FEATURE_KEY/true" "FEATURE_LOADEXTENSION/true"
6969

7070
0 // return an integer exit code
7171

src/SQLitePCLRaw.lib.e_sqlcipher/SQLitePCLRaw.lib.e_sqlcipher.nuspec

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -40,6 +40,7 @@
4040
<file src="$cb_bin_path$\e_sqlcipher\linux\musl-arm64\libe_sqlcipher.so" target="runtimes\alpine-arm64\native\libe_sqlcipher.so" />
4141
<file src="$cb_bin_path$\e_sqlcipher\linux\mips64\libe_sqlcipher.so" target="runtimes\linux-mips64\native\libe_sqlcipher.so" />
4242
<file src="$cb_bin_path$\e_sqlcipher\linux\s390x\libe_sqlcipher.so" target="runtimes\linux-s390x\native\libe_sqlcipher.so" />
43+
<file src="$cb_bin_path$\e_sqlcipher\linux\ppc64le\libe_sqlcipher.so" target="runtimes\linux-ppc64le\native\libe_sqlcipher.so" />
4344
<file src="$cb_bin_path$\e_sqlcipher\wasm\net6.0\e_sqlcipher.a" target="runtimes\browser-wasm\nativeassets\net6.0\e_sqlcipher.a" />
4445
<file src="$cb_bin_path$\e_sqlcipher\wasm\net7.0\e_sqlcipher.a" target="runtimes\browser-wasm\nativeassets\net7.0\e_sqlcipher.a" />
4546
<file src=".\net461\SQLitePCLRaw.lib.e_sqlcipher.targets" target="buildTransitive\net461" />

src/SQLitePCLRaw.lib.e_sqlite3/SQLitePCLRaw.lib.e_sqlite3.nuspec

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -40,6 +40,7 @@
4040
<file src="$cb_bin_path$\e_sqlite3\linux\musl-arm64\libe_sqlite3.so" target="runtimes\alpine-arm64\native\libe_sqlite3.so" />
4141
<file src="$cb_bin_path$\e_sqlite3\linux\mips64\libe_sqlite3.so" target="runtimes\linux-mips64\native\libe_sqlite3.so" />
4242
<file src="$cb_bin_path$\e_sqlite3\linux\s390x\libe_sqlite3.so" target="runtimes\linux-s390x\native\libe_sqlite3.so" />
43+
<file src="$cb_bin_path$\e_sqlite3\linux\ppc64le\libe_sqlite3.so" target="runtimes\linux-ppc64le\native\libe_sqlite3.so" />
4344
<file src="$cb_bin_path$\e_sqlite3\wasm\net6.0\e_sqlite3.a" target="runtimes\browser-wasm\nativeassets\net6.0\e_sqlite3.a" />
4445
<file src="$cb_bin_path$\e_sqlite3\wasm\net7.0\e_sqlite3.a" target="runtimes\browser-wasm\nativeassets\net7.0\e_sqlite3.a" />
4546
<file src=".\net461\SQLitePCLRaw.lib.e_sqlite3.targets" target="buildTransitive\net461" />

src/SQLitePCLRaw.provider.e_sqlcipher/Generated/provider_e_sqlcipher_funcptrs_notwin.cs

Lines changed: 11 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -587,8 +587,14 @@ int ISQLite3Provider.sqlite3_enable_load_extension(sqlite3 db, int onoff)
587587

588588
unsafe int ISQLite3Provider.sqlite3_load_extension(sqlite3 db, utf8z zFile, utf8z zProc, out utf8z pzErrMsg)
589589
{
590-
pzErrMsg = utf8z.FromPtr(null);
591-
return raw.SQLITE_ERROR;
590+
fixed (byte* p_zFile = zFile, p_zProc = zProc)
591+
{
592+
var rc = NativeMethods.sqlite3_load_extension(
593+
db, p_zFile, p_zProc,
594+
out var p_zErrMsg);
595+
pzErrMsg = utf8z.FromPtr(p_zErrMsg);
596+
return rc;
597+
}
592598
}
593599

594600

@@ -1589,6 +1595,9 @@ static class NativeMethods
15891595
[DllImport(SQLITE_DLL, ExactSpelling=true, CallingConvention = CALLING_CONVENTION)]
15901596
public static extern unsafe int sqlite3_enable_load_extension(sqlite3 db, int enable);
15911597

1598+
[DllImport(SQLITE_DLL, ExactSpelling=true, CallingConvention = CALLING_CONVENTION)]
1599+
public static extern unsafe int sqlite3_load_extension(sqlite3 db, byte* zFile, byte* zProc, out byte* pzErrMsg);
1600+
15921601
[DllImport(SQLITE_DLL, ExactSpelling=true, CallingConvention = CALLING_CONVENTION)]
15931602
public static extern unsafe int sqlite3_limit(sqlite3 db, int id, int newVal);
15941603

src/SQLitePCLRaw.provider.e_sqlcipher/Generated/provider_e_sqlcipher_funcptrs_win.cs

Lines changed: 11 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -591,8 +591,14 @@ int ISQLite3Provider.sqlite3_enable_load_extension(sqlite3 db, int onoff)
591591

592592
unsafe int ISQLite3Provider.sqlite3_load_extension(sqlite3 db, utf8z zFile, utf8z zProc, out utf8z pzErrMsg)
593593
{
594-
pzErrMsg = utf8z.FromPtr(null);
595-
return raw.SQLITE_ERROR;
594+
fixed (byte* p_zFile = zFile, p_zProc = zProc)
595+
{
596+
var rc = NativeMethods.sqlite3_load_extension(
597+
db, p_zFile, p_zProc,
598+
out var p_zErrMsg);
599+
pzErrMsg = utf8z.FromPtr(p_zErrMsg);
600+
return rc;
601+
}
596602
}
597603

598604

@@ -1593,6 +1599,9 @@ static class NativeMethods
15931599
[DllImport(SQLITE_DLL, ExactSpelling=true, CallingConvention = CALLING_CONVENTION)]
15941600
public static extern unsafe int sqlite3_enable_load_extension(sqlite3 db, int enable);
15951601

1602+
[DllImport(SQLITE_DLL, ExactSpelling=true, CallingConvention = CALLING_CONVENTION)]
1603+
public static extern unsafe int sqlite3_load_extension(sqlite3 db, byte* zFile, byte* zProc, out byte* pzErrMsg);
1604+
15961605
[DllImport(SQLITE_DLL, ExactSpelling=true, CallingConvention = CALLING_CONVENTION)]
15971606
public static extern unsafe int sqlite3_limit(sqlite3 db, int id, int newVal);
15981607

src/SQLitePCLRaw.provider.e_sqlite3/Generated/provider_e_sqlite3_funcptrs_notwin.cs

Lines changed: 11 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -575,8 +575,14 @@ int ISQLite3Provider.sqlite3_enable_load_extension(sqlite3 db, int onoff)
575575

576576
unsafe int ISQLite3Provider.sqlite3_load_extension(sqlite3 db, utf8z zFile, utf8z zProc, out utf8z pzErrMsg)
577577
{
578-
pzErrMsg = utf8z.FromPtr(null);
579-
return raw.SQLITE_ERROR;
578+
fixed (byte* p_zFile = zFile, p_zProc = zProc)
579+
{
580+
var rc = NativeMethods.sqlite3_load_extension(
581+
db, p_zFile, p_zProc,
582+
out var p_zErrMsg);
583+
pzErrMsg = utf8z.FromPtr(p_zErrMsg);
584+
return rc;
585+
}
580586
}
581587

582588

@@ -1577,6 +1583,9 @@ static class NativeMethods
15771583
[DllImport(SQLITE_DLL, ExactSpelling=true, CallingConvention = CALLING_CONVENTION)]
15781584
public static extern unsafe int sqlite3_enable_load_extension(sqlite3 db, int enable);
15791585

1586+
[DllImport(SQLITE_DLL, ExactSpelling=true, CallingConvention = CALLING_CONVENTION)]
1587+
public static extern unsafe int sqlite3_load_extension(sqlite3 db, byte* zFile, byte* zProc, out byte* pzErrMsg);
1588+
15801589
[DllImport(SQLITE_DLL, ExactSpelling=true, CallingConvention = CALLING_CONVENTION)]
15811590
public static extern unsafe int sqlite3_limit(sqlite3 db, int id, int newVal);
15821591

src/SQLitePCLRaw.provider.e_sqlite3/Generated/provider_e_sqlite3_funcptrs_win.cs

Lines changed: 11 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -579,8 +579,14 @@ int ISQLite3Provider.sqlite3_enable_load_extension(sqlite3 db, int onoff)
579579

580580
unsafe int ISQLite3Provider.sqlite3_load_extension(sqlite3 db, utf8z zFile, utf8z zProc, out utf8z pzErrMsg)
581581
{
582-
pzErrMsg = utf8z.FromPtr(null);
583-
return raw.SQLITE_ERROR;
582+
fixed (byte* p_zFile = zFile, p_zProc = zProc)
583+
{
584+
var rc = NativeMethods.sqlite3_load_extension(
585+
db, p_zFile, p_zProc,
586+
out var p_zErrMsg);
587+
pzErrMsg = utf8z.FromPtr(p_zErrMsg);
588+
return rc;
589+
}
584590
}
585591

586592

@@ -1581,6 +1587,9 @@ static class NativeMethods
15811587
[DllImport(SQLITE_DLL, ExactSpelling=true, CallingConvention = CALLING_CONVENTION)]
15821588
public static extern unsafe int sqlite3_enable_load_extension(sqlite3 db, int enable);
15831589

1590+
[DllImport(SQLITE_DLL, ExactSpelling=true, CallingConvention = CALLING_CONVENTION)]
1591+
public static extern unsafe int sqlite3_load_extension(sqlite3 db, byte* zFile, byte* zProc, out byte* pzErrMsg);
1592+
15841593
[DllImport(SQLITE_DLL, ExactSpelling=true, CallingConvention = CALLING_CONVENTION)]
15851594
public static extern unsafe int sqlite3_limit(sqlite3 db, int id, int newVal);
15861595

src/SQLitePCLRaw.provider.sqlcipher/Generated/provider_sqlcipher_funcptrs_notwin.cs

Lines changed: 11 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -587,8 +587,14 @@ int ISQLite3Provider.sqlite3_enable_load_extension(sqlite3 db, int onoff)
587587

588588
unsafe int ISQLite3Provider.sqlite3_load_extension(sqlite3 db, utf8z zFile, utf8z zProc, out utf8z pzErrMsg)
589589
{
590-
pzErrMsg = utf8z.FromPtr(null);
591-
return raw.SQLITE_ERROR;
590+
fixed (byte* p_zFile = zFile, p_zProc = zProc)
591+
{
592+
var rc = NativeMethods.sqlite3_load_extension(
593+
db, p_zFile, p_zProc,
594+
out var p_zErrMsg);
595+
pzErrMsg = utf8z.FromPtr(p_zErrMsg);
596+
return rc;
597+
}
592598
}
593599

594600

@@ -1589,6 +1595,9 @@ static class NativeMethods
15891595
[DllImport(SQLITE_DLL, ExactSpelling=true, CallingConvention = CALLING_CONVENTION)]
15901596
public static extern unsafe int sqlite3_enable_load_extension(sqlite3 db, int enable);
15911597

1598+
[DllImport(SQLITE_DLL, ExactSpelling=true, CallingConvention = CALLING_CONVENTION)]
1599+
public static extern unsafe int sqlite3_load_extension(sqlite3 db, byte* zFile, byte* zProc, out byte* pzErrMsg);
1600+
15921601
[DllImport(SQLITE_DLL, ExactSpelling=true, CallingConvention = CALLING_CONVENTION)]
15931602
public static extern unsafe int sqlite3_limit(sqlite3 db, int id, int newVal);
15941603

src/SQLitePCLRaw.provider.sqlcipher/Generated/provider_sqlcipher_funcptrs_win.cs

Lines changed: 11 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -591,8 +591,14 @@ int ISQLite3Provider.sqlite3_enable_load_extension(sqlite3 db, int onoff)
591591

592592
unsafe int ISQLite3Provider.sqlite3_load_extension(sqlite3 db, utf8z zFile, utf8z zProc, out utf8z pzErrMsg)
593593
{
594-
pzErrMsg = utf8z.FromPtr(null);
595-
return raw.SQLITE_ERROR;
594+
fixed (byte* p_zFile = zFile, p_zProc = zProc)
595+
{
596+
var rc = NativeMethods.sqlite3_load_extension(
597+
db, p_zFile, p_zProc,
598+
out var p_zErrMsg);
599+
pzErrMsg = utf8z.FromPtr(p_zErrMsg);
600+
return rc;
601+
}
596602
}
597603

598604

@@ -1593,6 +1599,9 @@ static class NativeMethods
15931599
[DllImport(SQLITE_DLL, ExactSpelling=true, CallingConvention = CALLING_CONVENTION)]
15941600
public static extern unsafe int sqlite3_enable_load_extension(sqlite3 db, int enable);
15951601

1602+
[DllImport(SQLITE_DLL, ExactSpelling=true, CallingConvention = CALLING_CONVENTION)]
1603+
public static extern unsafe int sqlite3_load_extension(sqlite3 db, byte* zFile, byte* zProc, out byte* pzErrMsg);
1604+
15961605
[DllImport(SQLITE_DLL, ExactSpelling=true, CallingConvention = CALLING_CONVENTION)]
15971606
public static extern unsafe int sqlite3_limit(sqlite3 db, int id, int newVal);
15981607

0 commit comments

Comments
 (0)