On 09.10.2013 15:50, Eric Minbiole wrote:

With this change, tests pass again:

     #if sizeof(p->nRow) == sizeof(long long)
     sqlite3_snprintf(24, zRet, "%lld", p->nRow);
     #elseif sizeof(p->Row) = sizeof(long)
     sqlite3_snprintf(24, zRet, "%ld", p->nRow);
     #else
     sqlite3_snprintf(24, zRet, "%d", p->nRow);
     #endif

Slightly off-topic, but I didn't think that sizeof() could be used as part
of a preprocessor directive?  (I.e., that #if sizeof(x) doesn't work as
intended, or at least not portably.)

This is more portable:

    #ifdef SQLITE_64BIT_STATS
    sqlite3_snprintf(24, zRet, "%lld", p->nRow);
    #else
    sqlite3_snprintf(24, zRet, "%d", p->nRow);
    #endif

Ralf
_______________________________________________
sqlite-users mailing list
sqlite-users@sqlite.org
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users

Reply via email to