example_extra_init.c 708 B

123456789101112131415161718192021222324
  1. /*
  2. ** If the canonical build process finds the file
  3. ** sqlite3_wasm_extra_init.c in the main wasm build directory, it
  4. ** arranges to include that file in the build of sqlite3.wasm and
  5. ** defines SQLITE_EXTRA_INIT=sqlite3_wasm_extra_init.
  6. **
  7. ** The C file must define the function sqlite3_wasm_extra_init() with
  8. ** this signature:
  9. **
  10. ** int sqlite3_wasm_extra_init(const char *)
  11. **
  12. ** and the sqlite3 library will call it with an argument of NULL one
  13. ** time during sqlite3_initialize(). If it returns non-0,
  14. ** initialization of the library will fail.
  15. */
  16. #include "sqlite3.h"
  17. #include <stdio.h>
  18. int sqlite3_wasm_extra_init(const char *z){
  19. fprintf(stderr,"%s: %s()\n", __FILE__, __func__);
  20. return 0;
  21. }