Thanks for the reply. I see your point about avoiding including sqlite3.h in
the header. I found the same can be accomplished by declaring a category in the
implementation file and declaring the variable there as follows:
@interface DatabaseController()
{
sqlite3 *_database;
}
@implementation
{
<implementation code here>
}
In fact that’s the technique FMDB uses even though they still declare the
variable as a void pointer. My apologies for neglecting to mention that.
Greg Moore
[email protected]
> On Jan 2, 2018, at 4:51 PM, Jens Alfke <[email protected]> wrote:
>
>
>
>> On Jan 2, 2018, at 1:49 PM, Gregory Moore <[email protected]> wrote:
>>
>> I was poking around in FMDB’s source code on github. FMDB is a widely used
>> Objective-C wrapper around SQLite. I was looking to see what they do out of
>> curiosity. FMDB declares and uses the database variable like this:
>>
>> void *_database;
>
> This was probably just done to avoid having to include <sqlite3.h> in the
> FMDB header files.
>
> —Jens
> _______________________________________________
> sqlite-users mailing list
> [email protected]
> http://mailinglists.sqlite.org/cgi-bin/mailman/listinfo/sqlite-users
_______________________________________________
sqlite-users mailing list
[email protected]
http://mailinglists.sqlite.org/cgi-bin/mailman/listinfo/sqlite-users