I am wrapping some sqlite3 C code in C++ and am confused about this type of argument void(*)(void*) in this function
int sqlite3_bind_blob(sqlite3_stmt*, int, const void*, int n, void(*)(void*));
So my wrapper looks like
int Query::Blob(int index, const void* blob, int blob_size, void* memory_management){
return sqlite3_bind_blob(stmt, index, blobl, blob_size, memory_management);
}
I should be able to pass the following to the last argument
Some function to free the blob memory
Either
SQLITE_STATICorSQLITE_TRANSIENTdefines
The two defines are unsurprisingly defined as
typedef void (*sqlite_3_destructor_type)(void*);
But I really don't understand the void/void syntax. How can I wrap that in my C++ method to accept a function like delete or the defines?