[nautilus-python/nautilus-3.0] Fixes bug #660348. Fix various warnings and issues
- From: Adam Plumb <adamplumb src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [nautilus-python/nautilus-3.0] Fixes bug #660348. Fix various warnings and issues
- Date: Wed, 5 Oct 2011 17:38:29 +0000 (UTC)
commit db96ae08c534842e208cbe3a48348cf5be10edd8
Author: Adam Plumb <adamplumb gmail com>
Date: Wed Oct 5 13:38:26 2011 -0400
Fixes bug #660348. Fix various warnings and issues
src/nautilus-python-object.c | 6 +++---
src/nautilus-python.c | 3 ++-
2 files changed, 5 insertions(+), 4 deletions(-)
---
diff --git a/src/nautilus-python-object.c b/src/nautilus-python-object.c
index ca0aeda..dde371d 100644
--- a/src/nautilus-python-object.c
+++ b/src/nautilus-python-object.c
@@ -230,7 +230,6 @@ nautilus_python_object_get_file_items (NautilusMenuProvider *provider,
GList *ret = NULL;
PyObject *py_ret = NULL, *py_files;
PyGILState_STATE state = pyg_gil_state_ensure();
- PyObject *provider_version = NULL;
debug_enter();
@@ -330,7 +329,7 @@ nautilus_python_object_get_columns (NautilusColumnProvider *provider)
{
NautilusPythonObject *object = (NautilusPythonObject*)provider;
GList *ret = NULL;
- PyObject *py_ret;
+ PyObject *py_ret = NULL;
PyGILState_STATE state = pyg_gil_state_ensure(); \
debug_enter();
@@ -346,7 +345,8 @@ nautilus_python_object_get_columns (NautilusColumnProvider *provider)
HANDLE_LIST(py_ret, NautilusColumn, "Nautilus.Column");
beach:
- Py_XDECREF(py_ret);
+ if (py_ret != NULL)
+ Py_XDECREF(py_ret);
pyg_gil_state_release(state);
return ret;
}
diff --git a/src/nautilus-python.c b/src/nautilus-python.c
index 4c524fd..a4e1013 100644
--- a/src/nautilus-python.c
+++ b/src/nautilus-python.c
@@ -137,6 +137,7 @@ nautilus_python_load_dir (GTypeModule *module,
{
g_warning("nautilus_python_init_python failed");
g_dir_close(dir);
+ break;
}
/* sys.path.insert(0, dirname) */
@@ -153,7 +154,7 @@ nautilus_python_load_dir (GTypeModule *module,
static gboolean
nautilus_python_init_python (void)
{
- PyObject *sys_path, *nautilus;
+ PyObject *nautilus;
GModule *libpython;
char *argv[] = { "nautilus", NULL };
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]