Home
last modified time | relevance | path

Searched refs:py_val (Results 1 – 4 of 4) sorted by relevance

/external/python/cpython2/Modules/_sqlite/
Dutil.c139 _pysqlite_long_as_int64(PyObject * py_val) in _pysqlite_long_as_int64() argument
143 PY_LONG_LONG value = PyLong_AsLongLongAndOverflow(py_val, &overflow); in _pysqlite_long_as_int64()
145 long value = PyLong_AsLongAndOverflow(py_val, &overflow); in _pysqlite_long_as_int64()
163 if (_PyLong_AsByteArray((PyLongObject *)py_val, in _pysqlite_long_as_int64()
Dconnection.c551 _pysqlite_set_result(sqlite3_context* context, PyObject* py_val) in _pysqlite_set_result() argument
553 if (py_val == Py_None) { in _pysqlite_set_result()
555 } else if (PyInt_Check(py_val)) { in _pysqlite_set_result()
556 sqlite3_result_int64(context, (sqlite_int64)PyInt_AsLong(py_val)); in _pysqlite_set_result()
557 } else if (PyLong_Check(py_val)) { in _pysqlite_set_result()
558 sqlite_int64 value = _pysqlite_long_as_int64(py_val); in _pysqlite_set_result()
562 } else if (PyFloat_Check(py_val)) { in _pysqlite_set_result()
563 sqlite3_result_double(context, PyFloat_AsDouble(py_val)); in _pysqlite_set_result()
564 } else if (PyBuffer_Check(py_val)) { in _pysqlite_set_result()
567 if (PyObject_AsCharBuffer(py_val, &buffer, &buflen) != 0) { in _pysqlite_set_result()
[all …]
/external/python/cpython3/Modules/_sqlite/
Dutil.c107 _pysqlite_long_as_int64(PyObject * py_val) in _pysqlite_long_as_int64() argument
110 long long value = PyLong_AsLongLongAndOverflow(py_val, &overflow); in _pysqlite_long_as_int64()
121 if (_PyLong_AsByteArray((PyLongObject *)py_val, in _pysqlite_long_as_int64()
Dconnection.c496 _pysqlite_set_result(sqlite3_context* context, PyObject* py_val) in _pysqlite_set_result() argument
498 if (py_val == Py_None) { in _pysqlite_set_result()
500 } else if (PyLong_Check(py_val)) { in _pysqlite_set_result()
501 sqlite_int64 value = _pysqlite_long_as_int64(py_val); in _pysqlite_set_result()
505 } else if (PyFloat_Check(py_val)) { in _pysqlite_set_result()
506 sqlite3_result_double(context, PyFloat_AsDouble(py_val)); in _pysqlite_set_result()
507 } else if (PyUnicode_Check(py_val)) { in _pysqlite_set_result()
508 const char *str = PyUnicode_AsUTF8(py_val); in _pysqlite_set_result()
512 } else if (PyObject_CheckBuffer(py_val)) { in _pysqlite_set_result()
514 if (PyObject_GetBuffer(py_val, &view, PyBUF_SIMPLE) != 0) { in _pysqlite_set_result()