Author: guido.van.rossum
Date: Fri Aug 10 20:35:04 2007
New Revision: 56903

Modified:
   python/branches/py3k/Modules/_sqlite/connection.c
Log:
Fix a bit of code that wasn't converted properly, causing a segfault.


Modified: python/branches/py3k/Modules/_sqlite/connection.c
==============================================================================
--- python/branches/py3k/Modules/_sqlite/connection.c   (original)
+++ python/branches/py3k/Modules/_sqlite/connection.c   Fri Aug 10 20:35:04 2007
@@ -415,7 +415,6 @@
     long longval;
     const char* buffer;
     Py_ssize_t buflen;
-    PyObject* stringval;
 
     if ((!py_val) || PyErr_Occurred()) {
         sqlite3_result_null(context);
@@ -435,9 +434,7 @@
     } else if (PyString_Check(py_val)) {
         sqlite3_result_text(context, PyString_AsString(py_val), -1, 
SQLITE_TRANSIENT);
     } else if (PyUnicode_Check(py_val)) {
-        if (stringval) {
-            sqlite3_result_text(context, PyUnicode_AsString(stringval), -1, 
SQLITE_TRANSIENT);
-        }
+        sqlite3_result_text(context, PyUnicode_AsString(py_val), -1, 
SQLITE_TRANSIENT);
     } else {
         /* TODO: raise error */
     }
_______________________________________________
Python-3000-checkins mailing list
[email protected]
http://mail.python.org/mailman/listinfo/python-3000-checkins

Reply via email to