~ubuntu-branches/ubuntu/precise/python3.2/precise-proposed

« back to all changes in this revision

Viewing changes to Modules/_sqlite/statement.c

  • Committer: Package Import Robot
  • Author(s): Matthias Klose
  • Date: 2012-03-09 18:40:39 UTC
  • mfrom: (30.1.2 sid)
  • Revision ID: package-import@ubuntu.com-20120309184039-j3yk2emxr1plyo21
Tags: 3.2.3~rc1-1
* Python 3.2.3 release candidate 1.
* Update to 20120309 from the 3.2 branch.
* Fix libpython.a symlink. Closes: #660146.
* Build-depend on xauth.
* Run the gdb tests for the debug build only.

Show diffs side-by-side

added added

removed removed

Lines of Context:
129
129
            rc = sqlite3_bind_double(self->st, pos, PyFloat_AsDouble(parameter));
130
130
            break;
131
131
        case TYPE_UNICODE:
132
 
            string = _PyUnicode_AsString(parameter);
 
132
            string = _PyUnicode_AsStringAndSize(parameter, &buflen);
133
133
            if (string != NULL)
134
 
                rc = sqlite3_bind_text(self->st, pos, string, -1, SQLITE_TRANSIENT);
 
134
                rc = sqlite3_bind_text(self->st, pos, string, buflen, SQLITE_TRANSIENT);
135
135
            else
136
136
                rc = -1;
137
137
            break;