[issue43296] [sqlite3] sqlite3_value_bytes() should be called after sqlite3_value_blob()

2021-02-22 Thread Erlend Egeberg Aasland


Erlend Egeberg Aasland  added the comment:

Related:
If sqlite3_value_blob() returns NULL, we should check if sqlite3_errcode() 
equals SQLITE_NOMEM and raise MemoryError if it does.

If not, we should initialise cur_py_value to None, because as the 
PyBytes_FromStringAndSize docs says: "If v is NULL, the contents of the bytes 
object are uninitialized."

--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue43296] [sqlite3] sqlite3_value_bytes() should be called after sqlite3_value_blob()

2021-02-22 Thread Erlend Egeberg Aasland


New submission from Erlend Egeberg Aasland :

The sqlite3_value_*() API is almost identical to the sqlite3_column_*() API. 
sqlite3_value_bytes() should be called after we've converted the value using 
sqlite3_value_blob().

See also bpo-43249.

--
components: Library (Lib)
messages: 387516
nosy: berker.peksag, erlendaasland, serhiy.storchaka
priority: normal
severity: normal
status: open
title: [sqlite3] sqlite3_value_bytes() should be called after 
sqlite3_value_blob()
type: behavior
versions: Python 3.10

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com