OLD | NEW |
1 /* | 1 /* |
2 ** 2006 June 14 | 2 ** 2006 June 14 |
3 ** | 3 ** |
4 ** The author disclaims copyright to this source code. In place of | 4 ** The author disclaims copyright to this source code. In place of |
5 ** a legal notice, here is a blessing: | 5 ** a legal notice, here is a blessing: |
6 ** | 6 ** |
7 ** May you do good and not evil. | 7 ** May you do good and not evil. |
8 ** May you find forgiveness for yourself and forgive others. | 8 ** May you find forgiveness for yourself and forgive others. |
9 ** May you share freely, never taking more than you give. | 9 ** May you share freely, never taking more than you give. |
10 ** | 10 ** |
11 ************************************************************************* | 11 ************************************************************************* |
12 ** Test extension for testing the sqlite3_load_extension() function. | 12 ** Test extension for testing the sqlite3_load_extension() function. |
13 ** | |
14 ** $Id: test_loadext.c,v 1.3 2008/08/02 03:50:39 drh Exp $ | |
15 */ | 13 */ |
16 #include <string.h> | 14 #include <string.h> |
17 #include "sqlite3ext.h" | 15 #include "sqlite3ext.h" |
18 SQLITE_EXTENSION_INIT1 | 16 SQLITE_EXTENSION_INIT1 |
19 | 17 |
20 /* | 18 /* |
21 ** The half() SQL function returns half of its input value. | 19 ** The half() SQL function returns half of its input value. |
22 */ | 20 */ |
23 static void halfFunc( | 21 static void halfFunc( |
24 sqlite3_context *context, | 22 sqlite3_context *context, |
(...skipping 90 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
115 sqlite3 *db, | 113 sqlite3 *db, |
116 char **pzErrMsg, | 114 char **pzErrMsg, |
117 const sqlite3_api_routines *pApi | 115 const sqlite3_api_routines *pApi |
118 ){ | 116 ){ |
119 char *zErr; | 117 char *zErr; |
120 SQLITE_EXTENSION_INIT2(pApi); | 118 SQLITE_EXTENSION_INIT2(pApi); |
121 zErr = sqlite3_mprintf("broken!"); | 119 zErr = sqlite3_mprintf("broken!"); |
122 *pzErrMsg = zErr; | 120 *pzErrMsg = zErr; |
123 return 1; | 121 return 1; |
124 } | 122 } |
OLD | NEW |