From: Ilia Alshanetsky Date: Wed, 20 May 2009 15:03:16 +0000 (+0000) Subject: Re-introduce the Matteo's patch and combine default & text handling since X-Git-Tag: php-5.2.10RC1~36 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=1bebeea29c2f34e24ba5af9d52ffa443b17f2db4;p=php Re-introduce the Matteo's patch and combine default & text handling since they appear to be the same irregardless on notes inside sqlite3.h --- diff --git a/ext/pdo_sqlite/sqlite_statement.c b/ext/pdo_sqlite/sqlite_statement.c index 8827f8b216..cb1fdf1264 100644 --- a/ext/pdo_sqlite/sqlite_statement.c +++ b/ext/pdo_sqlite/sqlite_statement.c @@ -231,25 +231,9 @@ static int pdo_sqlite_stmt_get_col(pdo_stmt_t *stmt, int colno, char **ptr, unsi *len = sqlite3_column_bytes(S->stmt, colno); return 1; - case SQLITE3_TEXT: - *ptr = (char*)sqlite3_column_text(S->stmt, colno); - *len = sqlite3_column_bytes(S->stmt, colno); - if (*len) { - /* sqlite3.h says "the NUL terminator is included in the byte count - * for TEXT values" */ - *len--; - } - return 1; - default: *ptr = (char*)sqlite3_column_text(S->stmt, colno); *len = sqlite3_column_bytes(S->stmt, colno); -#if SQLITE_VERSION_NUMBER < 3004000 - if (*len) { - /* sqlite3.h says "the NUL terminator is included in the byte count for TEXT values" */ - (*len)--; - } -#endif return 1; } }