SQLite Forum

Linkage #defines are unused
Login
The amalgamation sqlite3.c has:

```c
/*
** Provide the ability to override linkage features of the interface.
*/
#ifndef SQLITE_EXTERN
# define SQLITE_EXTERN extern
#endif
#ifndef SQLITE_API
# define SQLITE_API
#endif
#ifndef SQLITE_CDECL
# define SQLITE_CDECL
#endif
#ifndef SQLITE_APICALL
# define SQLITE_APICALL
#endif
#ifndef SQLITE_STDCALL
# define SQLITE_STDCALL SQLITE_APICALL
#endif
#ifndef SQLITE_CALLBACK
# define SQLITE_CALLBACK
#endif
#ifndef SQLITE_SYSAPI
# define SQLITE_SYSAPI
#endif
```

But most of these #defines are either unused or nearly unused. SQLITE_API is used extensively, but SQLITE_CDECL is only used 3 times, SQLITE_EXTERN is only used once, and SQLITE_APICALL, SQLITE_STDCALL, SQLITE_CALLBACK and SQLITE_SYSAPI are never used.

Should these #defines be used? For example, should the last three parameters to sqlite3_create_function be marked as SQLITE_CALLBACK? (Or, if not, should these #defines be removed from the amalgamation?)

Thanks,

David