diff options
author | Guannan Ren <gren@redhat.com> | 2012-09-27 01:33:50 +0800 |
---|---|---|
committer | Cole Robinson <crobinso@redhat.com> | 2012-10-18 12:59:01 -0400 |
commit | 10f2d97ecfbf8505120d1ebbd2c5717133c3d15f (patch) | |
tree | 099ae430ed3d4d764524950cd329daae859fe645 /README | |
parent | 48e9333bec0e96b667ba5a17093ac4aeef3491a3 (diff) | |
download | libvirt-python-v6-10f2d97ecfbf8505120d1ebbd2c5717133c3d15f.tar.gz libvirt-python-v6-10f2d97ecfbf8505120d1ebbd2c5717133c3d15f.tar.xz libvirt-python-v6-10f2d97ecfbf8505120d1ebbd2c5717133c3d15f.zip |
python: return error if PyObject obj is NULL for unwrapper helper functions
The result is indeterminate for NULL argument to python
functions as follows. It's better to return negative value in
these situations.
PyObject_IsTrue will segfault if the argument is NULL
PyFloat_AsDouble(NULL) is -1.000000
PyLong_AsUnsignedLongLong(NULL) is 0.000000
(cherry picked from commit 4c6be02a3e502027a819e20b6f5add8f63c20291)
Diffstat (limited to 'README')
0 files changed, 0 insertions, 0 deletions