| OLD | NEW |
| 1 /* | 1 /* |
| 2 ** 2006 August 23 | 2 ** 2006 August 23 |
| 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_auto_extension() function. | 12 ** Test extension for testing the sqlite3_auto_extension() function. |
| 13 ** | 13 ** |
| 14 ** $Id: test_autoext.c,v 1.5 2008/07/08 02:12:37 drh Exp $ | 14 ** $Id: test_autoext.c,v 1.5 2008/07/08 02:12:37 drh Exp $ |
| 15 */ | 15 */ |
| 16 #include "tcl.h" | 16 #include "tcl.h" |
| 17 #include "sqlite3ext.h" | 17 #include "sqlite3ext.h" |
| 18 | 18 |
| 19 #ifndef SQLITE_OMIT_LOAD_EXTENSION | 19 #ifndef SQLITE_OMIT_LOAD_EXTENSION |
| 20 #ifndef SQLITE_CORE | |
| 21 static SQLITE_EXTENSION_INIT1 | 20 static SQLITE_EXTENSION_INIT1 |
| 22 #endif | |
| 23 | 21 |
| 24 /* | 22 /* |
| 25 ** The sqr() SQL function returns the square of its input value. | 23 ** The sqr() SQL function returns the square of its input value. |
| 26 */ | 24 */ |
| 27 static void sqrFunc( | 25 static void sqrFunc( |
| 28 sqlite3_context *context, | 26 sqlite3_context *context, |
| 29 int argc, | 27 int argc, |
| 30 sqlite3_value **argv | 28 sqlite3_value **argv |
| 31 ){ | 29 ){ |
| 32 double r = sqlite3_value_double(argv[0]); | 30 double r = sqlite3_value_double(argv[0]); |
| (...skipping 129 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 162 autoExtSqrObjCmd, 0, 0); | 160 autoExtSqrObjCmd, 0, 0); |
| 163 Tcl_CreateObjCommand(interp, "sqlite3_auto_extension_cube", | 161 Tcl_CreateObjCommand(interp, "sqlite3_auto_extension_cube", |
| 164 autoExtCubeObjCmd, 0, 0); | 162 autoExtCubeObjCmd, 0, 0); |
| 165 Tcl_CreateObjCommand(interp, "sqlite3_auto_extension_broken", | 163 Tcl_CreateObjCommand(interp, "sqlite3_auto_extension_broken", |
| 166 autoExtBrokenObjCmd, 0, 0); | 164 autoExtBrokenObjCmd, 0, 0); |
| 167 #endif | 165 #endif |
| 168 Tcl_CreateObjCommand(interp, "sqlite3_reset_auto_extension", | 166 Tcl_CreateObjCommand(interp, "sqlite3_reset_auto_extension", |
| 169 resetAutoExtObjCmd, 0, 0); | 167 resetAutoExtObjCmd, 0, 0); |
| 170 return TCL_OK; | 168 return TCL_OK; |
| 171 } | 169 } |
| OLD | NEW |