http://www.sqlite.org/loadext.html states that:
...omitting the second argument for the load_extension() SQL
interface - and the extension loader logic will attempt to
figure out the entry point on its own. It will first try the
generic extension name "sqlite3_extension_init". If that does
not work, it constructs a entry point using the template
"sqlite3_X_init" where the X is replaced by the lowercase
equivalent of every ASCII character in the filename...
The documentation for sqlite3LoadExtension on the other hand says:
The entry point is zProc. zProc may be 0 in which case a
default entry point name (sqlite3_extension_init) is used. Use
of the default name is recommended.
AFAICT the second description matches what the code actually does. The
example extensions in ext/misc all use sqlite3_<extension_name>_init.
This avoids name clashes but makes it a little bit more cumbersome for
people to load the extensions.
What is the recommended practice for naming the extension entry point?
Should I use sqlite3_extension_init or sqlite3_<extension_name>_init?
Thanks,
Pepijn
_______________________________________________
sqlite-users mailing list
[email protected]
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users