Anonymous avatar Anonymous committed 300ad5b

Switched to generational global root registration

Comments (0)

Files changed (3)

+2009-01-05:  Switched to generational global root registration of
+             callbacks for better performance.
+             Requires OCaml 3.11 or higher!!!
 2008-12-02: Added function enable_load_extension if it is available.
             Thanks to Pietro Abate <> for
 LIB_CNAMES = sqlite3_stubs
 LIB_MLNAMES = sqlite3
-OCamlPreprocess(cpp -pp, sqlite3)
+OCamlPreprocess(cpp, sqlite3)
   if (--dbw->ref_count == 0) {
     struct user_function *link;
     for (link = dbw->user_functions; link != NULL; link = link->next) {
-      caml_remove_global_root(&link->v_fun);
+      caml_remove_generational_global_root(&link->v_fun);
     dbw->user_functions = NULL;
     if (strcmp(String_val(Field(link->v_fun, 0)), name) == 0) {
       if (prev == NULL) db_data->user_functions = link->next;
       else prev->next = link->next;
-      caml_remove_global_root(&link->v_fun);
+      caml_remove_generational_global_root(&link->v_fun);
   link = caml_stat_alloc(sizeof *link);
   link->v_fun = cell;
   link->next = db_data->user_functions;
-  caml_register_global_root(&link->v_fun);
+  caml_register_generational_global_root(&link->v_fun);
   db_data->user_functions = link;
   return link;
Tip: Filter by directory path e.g. /media app.js to search for public/media/app.js.
Tip: Use camelCasing e.g. ProjME to search for
Tip: Filter by extension type e.g. /repo .js to search for all .js files in the /repo directory.
Tip: Separate your search with spaces e.g. /ssh pom.xml to search for src/ssh/pom.xml.
Tip: Use ↑ and ↓ arrow keys to navigate and return to view the file.
Tip: You can also navigate files with Ctrl+j (next) and Ctrl+k (previous) and view the file with Ctrl+o.
Tip: You can also navigate files with Alt+j (next) and Alt+k (previous) and view the file with Alt+o.