Author: Brian Kearns <bdkea...@gmail.com> Branch: Changeset: r62997:b0cf3609c4c6 Date: 2013-04-04 02:00 -0400 http://bitbucket.org/pypy/pypy/changeset/b0cf3609c4c6/
Log: more sqlite adaptations for cffi diff --git a/lib_pypy/_sqlite3.py b/lib_pypy/_sqlite3.py --- a/lib_pypy/_sqlite3.py +++ b/lib_pypy/_sqlite3.py @@ -1195,7 +1195,7 @@ if self.__con._detect_types & PARSE_COLNAMES: colname = _lib.sqlite3_column_name(self._statement, i) - if colname is not None: + if colname: colname = _ffi.string(colname).decode('utf-8') type_start = -1 key = None @@ -1208,7 +1208,7 @@ if converter is None and self.__con._detect_types & PARSE_DECLTYPES: decltype = _lib.sqlite3_column_decltype(self._statement, i) - if decltype is not None: + if decltype: decltype = _ffi.string(decltype).decode('utf-8') # if multiple words, use first, eg. # "INTEGER NOT NULL" => "INTEGER" _______________________________________________ pypy-commit mailing list pypy-commit@python.org http://mail.python.org/mailman/listinfo/pypy-commit