[pypy-commit] pypy py3k: merge heads
bdkearns
noreply at buildbot.pypy.org
Wed Mar 6 08:17:25 CET 2013
Author: Brian Kearns <bdkearns at gmail.com>
Branch: py3k
Changeset: r62122:6938c45d35ce
Date: 2013-03-06 02:17 -0500
http://bitbucket.org/pypy/pypy/changeset/6938c45d35ce/
Log: merge heads
diff --git a/lib_pypy/_sqlite3.py b/lib_pypy/_sqlite3.py
--- a/lib_pypy/_sqlite3.py
+++ b/lib_pypy/_sqlite3.py
@@ -720,6 +720,10 @@
if ret != SQLITE_OK:
raise self._get_exception(ret)
+ def __get_in_transaction(self):
+ return self._in_transaction
+ in_transaction = property(__get_in_transaction)
+
def __get_total_changes(self):
self._check_closed()
return sqlite.sqlite3_total_changes(self._db)
@@ -879,6 +883,8 @@
def executescript(self, sql):
self.__description = None
self._reset = False
+ if type(sql) is str:
+ sql = sql.encode("utf-8")
self._check_closed()
statement = c_void_p()
c_sql = c_char_p(sql)
@@ -1060,7 +1066,7 @@
if param is None:
sqlite.sqlite3_bind_null(self.statement, idx)
- elif type(param) in (bool, int, int):
+ elif type(param) in (bool, int):
if -2147483648 <= param <= 2147483647:
sqlite.sqlite3_bind_int(self.statement, idx, param)
else:
More information about the pypy-commit
mailing list