diff options
Diffstat (limited to 'www/loadext.html')
-rw-r--r-- | www/loadext.html | 20 |
1 files changed, 10 insertions, 10 deletions
diff --git a/www/loadext.html b/www/loadext.html index daa2912..dfa850c 100644 --- a/www/loadext.html +++ b/www/loadext.html @@ -191,7 +191,7 @@ by the <a href="c3ref/load_extension.html">sqlite3_load_extension()</a> interfac C interface.</p> <p>Both methods for loading an extension allow you to specify -the name of an entry point for the extension. +the name of an entry point for the extension. You can leave this argument blank - passing in a NULL pointer for the <a href="c3ref/load_extension.html">sqlite3_load_extension()</a> C-language interface or omitting the second argument for the <a href="lang_corefunc.html#load_extension">load_extension()</a> SQL interface - @@ -203,7 +203,7 @@ by the lowercase equivalent of every ASCII character in the filename after the last "/" and before the first following "." omitting the first three characters if they happen to be "lib". So, for example, if the filename is "/usr/lib/libmathfunc-4.8.so" the entry point name -would be "sqlite3_mathfunc_init". Or if the filename is +would be "sqlite3_mathfunc_init". Or if the filename is "./SpellFixExt.dll" then the entry point would be called "sqlite3_spellfixext_init". @@ -289,12 +289,12 @@ code files instead of "<tt>#include <sqlite3.h></tt>". </p> </li><li><p> -Put the macro "<tt>SQLITE_EXTENSION_INIT1</tt>" on a line by itself +Put the macro "<tt>SQLITE_EXTENSION_INIT1</tt>" on a line by itself right after the "<tt>#include <sqlite3ext.h></tt>" line. </p> </li><li><p> -Add an extension loading entry point routine that looks like +Add an extension loading entry point routine that looks like something the following: </p><div class="codeblock"><pre>#ifdef _WIN32 @@ -325,7 +325,7 @@ above, then the correct entry point name would be "sqlite3_yourcode_init". </p></li></ol> -<p>Here is a complete template extension that you can copy/paste +<p>Here is a complete template extension that you can copy/paste to get started:</p> <div class="codeblock"><pre>/* Add your header comment here */ @@ -344,8 +344,8 @@ __declspec(dllexport) ** discarding the first three characters if they are "lib". */ int sqlite3_extension_init( - sqlite3 *db, - char **pzErrMsg, + sqlite3 *db, + char **pzErrMsg, const sqlite3_api_routines *pApi ){ int rc = SQLITE_OK; @@ -363,12 +363,12 @@ int sqlite3_extension_init( <h2 id="example_extensions"><span>4.1. </span>Example Extensions</h2> -<p>Many examples of complete and working loadable extensions can be +<p>Many examples of complete and working loadable extensions can be seen in the SQLite source tree in the <a href="https://www.sqlite.org/src/file/ext/misc">ext/misc</a> subdirectory. Each file in that directory is a separate extension. Documentation is provided by a header comment on the file. -Here are brief notes on a few of the extensions in +Here are brief notes on a few of the extensions in the <a href="https://www.sqlite.org/src/file/ext/misc">ext/misc</a> subdirectory: </p><ul> @@ -388,7 +388,7 @@ This is a larger and more complex extension. Implementation of a new <a href="vfs.html">VFS</a> that stores all content in-memory. </p></li><li><p> <a href="https://www.sqlite.org/src/file/ext/misc/rot13.c">rot13.c</a> — -Implementation of a <a href="https://en.wikipedia.org/wiki/ROT13">rot13()</a> +Implementation of a <a href="https://en.wikipedia.org/wiki/ROT13">rot13()</a> SQL function. This is a very simple example of an extension function and is useful as a template for creating new extensions. </p></li><li><p> |