diff options
author | Cyrille Bagard <nocbos@gmail.com> | 2019-02-03 13:12:02 (GMT) |
---|---|---|
committer | Cyrille Bagard <nocbos@gmail.com> | 2019-02-03 13:12:02 (GMT) |
commit | fa44be1e890cef23d0cf987dfc985d5a9fd645de (patch) | |
tree | 5a795e53836eada414de50dcb12fb928da73691a /plugins/pychrysalide/analysis/contents | |
parent | 097e2f0265ea9cacdfbc7ab1ac7f1b64054b570f (diff) |
Raised exception in some Python constructors.
Diffstat (limited to 'plugins/pychrysalide/analysis/contents')
-rw-r--r-- | plugins/pychrysalide/analysis/contents/encapsulated.c | 2 | ||||
-rw-r--r-- | plugins/pychrysalide/analysis/contents/file.c | 2 | ||||
-rw-r--r-- | plugins/pychrysalide/analysis/contents/memory.c | 2 |
3 files changed, 3 insertions, 3 deletions
diff --git a/plugins/pychrysalide/analysis/contents/encapsulated.c b/plugins/pychrysalide/analysis/contents/encapsulated.c index 03db638..7af79e8 100644 --- a/plugins/pychrysalide/analysis/contents/encapsulated.c +++ b/plugins/pychrysalide/analysis/contents/encapsulated.c @@ -71,7 +71,7 @@ static PyObject *py_encaps_content_new(PyTypeObject *type, PyObject *args, PyObj get_python_binary_content_type(), &base_obj, &path, get_python_binary_content_type(), &endpoint_obj); - if (!ret) Py_RETURN_NONE; + if (!ret) return NULL; base = G_BIN_CONTENT(pygobject_get(base_obj)); endpoint = G_BIN_CONTENT(pygobject_get(endpoint_obj)); diff --git a/plugins/pychrysalide/analysis/contents/file.c b/plugins/pychrysalide/analysis/contents/file.c index b7a217a..f660656 100644 --- a/plugins/pychrysalide/analysis/contents/file.c +++ b/plugins/pychrysalide/analysis/contents/file.c @@ -63,7 +63,7 @@ static PyObject *py_file_content_new(PyTypeObject *type, PyObject *args, PyObjec GBinContent *content; /* Version GLib du contenu */ ret = PyArg_ParseTuple(args, "s", &filename); - if (!ret) Py_RETURN_NONE; + if (!ret) return NULL; content = g_file_content_new(filename); diff --git a/plugins/pychrysalide/analysis/contents/memory.c b/plugins/pychrysalide/analysis/contents/memory.c index 89a2aa8..d1da2e8 100644 --- a/plugins/pychrysalide/analysis/contents/memory.c +++ b/plugins/pychrysalide/analysis/contents/memory.c @@ -65,7 +65,7 @@ static PyObject *py_memory_content_new(PyTypeObject *type, PyObject *args, PyObj GBinContent *content; /* Version GLib du contenu */ ret = PyArg_ParseTuple(args, "S", &data); - if (!ret) Py_RETURN_NONE; + if (!ret) return NULL; ret = PyBytes_AsStringAndSize(data, &buffer, &length); if (ret == -1) Py_RETURN_NONE; |