aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/libraries/sqlite/unix/sqlite-3.5.1/src/test_loadext.c
diff options
context:
space:
mode:
authordan miller2007-10-21 08:36:32 +0000
committerdan miller2007-10-21 08:36:32 +0000
commit2f8d7092bc2c9609fa98d6888106b96f38b22828 (patch)
treeda6c37579258cc965b52a75aee6135fe44237698 /libraries/sqlite/unix/sqlite-3.5.1/src/test_loadext.c
parent* Committing new PolicyManager based on an ACL system. (diff)
downloadopensim-SC-2f8d7092bc2c9609fa98d6888106b96f38b22828.zip
opensim-SC-2f8d7092bc2c9609fa98d6888106b96f38b22828.tar.gz
opensim-SC-2f8d7092bc2c9609fa98d6888106b96f38b22828.tar.bz2
opensim-SC-2f8d7092bc2c9609fa98d6888106b96f38b22828.tar.xz
libraries moved to opensim-libs, a new repository
Diffstat (limited to 'libraries/sqlite/unix/sqlite-3.5.1/src/test_loadext.c')
-rw-r--r--libraries/sqlite/unix/sqlite-3.5.1/src/test_loadext.c57
1 files changed, 0 insertions, 57 deletions
diff --git a/libraries/sqlite/unix/sqlite-3.5.1/src/test_loadext.c b/libraries/sqlite/unix/sqlite-3.5.1/src/test_loadext.c
deleted file mode 100644
index 1204971..0000000
--- a/libraries/sqlite/unix/sqlite-3.5.1/src/test_loadext.c
+++ /dev/null
@@ -1,57 +0,0 @@
1/*
2** 2006 June 14
3**
4** The author disclaims copyright to this source code. In place of
5** a legal notice, here is a blessing:
6**
7** May you do good and not evil.
8** May you find forgiveness for yourself and forgive others.
9** May you share freely, never taking more than you give.
10**
11*************************************************************************
12** Test extension for testing the sqlite3_load_extension() function.
13**
14** $Id: test_loadext.c,v 1.1 2006/06/14 10:38:03 danielk1977 Exp $
15*/
16
17#include "sqlite3ext.h"
18SQLITE_EXTENSION_INIT1
19
20/*
21** The half() SQL function returns half of its input value.
22*/
23static void halfFunc(
24 sqlite3_context *context,
25 int argc,
26 sqlite3_value **argv
27){
28 sqlite3_result_double(context, 0.5*sqlite3_value_double(argv[0]));
29}
30
31/*
32** Extension load function.
33*/
34int testloadext_init(
35 sqlite3 *db,
36 char **pzErrMsg,
37 const sqlite3_api_routines *pApi
38){
39 SQLITE_EXTENSION_INIT2(pApi);
40 sqlite3_create_function(db, "half", 1, SQLITE_ANY, 0, halfFunc, 0, 0);
41 return 0;
42}
43
44/*
45** Another extension entry point. This one always fails.
46*/
47int testbrokenext_init(
48 sqlite3 *db,
49 char **pzErrMsg,
50 const sqlite3_api_routines *pApi
51){
52 char *zErr;
53 SQLITE_EXTENSION_INIT2(pApi);
54 zErr = sqlite3_mprintf("broken!");
55 *pzErrMsg = zErr;
56 return 1;
57}