diff options
| author | Dmitry Stogov <dmitry@php.net> | 2006-01-17 12:18:53 +0000 |
|---|---|---|
| committer | Dmitry Stogov <dmitry@php.net> | 2006-01-17 12:18:53 +0000 |
| commit | 227295a4f1df63b8740aa2bdd8cdca61be738268 (patch) | |
| tree | efb1f210d045f33372e694d6835ff8c8fa7151ff /ext/sqlite/sqlite.c | |
| parent | 465b131c2f15f5816f7db02b0dd69907a1d0dd3d (diff) | |
| download | php-git-227295a4f1df63b8740aa2bdd8cdca61be738268.tar.gz | |
Unicode stuff is changed according to decision maden on PDM.
Now IS_BINRAY data type is removed and IS_STRING starts behave as IS_BINARY in unicode mode. IS_STRING is incompatible with IS_UNICODE, so ALL functions should be improved to support unicode mode.
Diffstat (limited to 'ext/sqlite/sqlite.c')
| -rw-r--r-- | ext/sqlite/sqlite.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/ext/sqlite/sqlite.c b/ext/sqlite/sqlite.c index c9c125b04e..96e87a1535 100644 --- a/ext/sqlite/sqlite.c +++ b/ext/sqlite/sqlite.c @@ -442,7 +442,7 @@ static void php_sqlite_generic_function_callback(sqlite_func *func, int argc, co return; } - ZVAL_STRING(&funcname, (char*)argv[0], 1); + ZVAL_ASCII_STRING(&funcname, (char*)argv[0], 1); if (!zend_make_callable(&funcname, &callable TSRMLS_CC)) { spprintf(&errbuf, 0, "function `%R' is not a function name", Z_TYPE(callable), Z_UNIVAL(callable)); @@ -1862,7 +1862,7 @@ static void php_sqlite_fetch_array(struct php_sqlite_result *res, int mode, zend Z_STRVAL_P(decoded) = emalloc(strlen(rowdata[j])); Z_STRLEN_P(decoded) = php_sqlite_decode_binary(rowdata[j]+1, Z_STRVAL_P(decoded)); Z_STRVAL_P(decoded)[Z_STRLEN_P(decoded)] = '\0'; - Z_TYPE_P(decoded) = UG(unicode)?IS_BINARY:IS_STRING; + Z_TYPE_P(decoded) = IS_STRING; if (!buffered) { efree((char*)rowdata[j]); rowdata[j] = NULL; @@ -1951,7 +1951,7 @@ static void php_sqlite_fetch_column(struct php_sqlite_result *res, zval *which, char *decoded = emalloc(l); l = php_sqlite_decode_binary(rowdata[j]+1, decoded); decoded[l] = '\0'; - RETVAL_BINARYL(decoded, l, 0); + RETVAL_STRINGL(decoded, l, 0); if (!res->buffered) { efree((char*)rowdata[j]); rowdata[j] = NULL; |
