+2010-01-20 Jan Kratochvil <jan.kratochvil@redhat.com>
+
+ * varobj.c (varobj_add_child, install_dynamic_child): Wrap into #if
+ HAVE_PYTHON.
+ (instantiate_pretty_printer): Move HAVE_PYTHON outside of the function.
+
2010-01-20 Joel Brobecker <brobecker@adacore.com>
Get rid of ada-lang.c:function_name_from_pc.
static int is_root_p (struct varobj *var);
+#if HAVE_PYTHON
+
static struct varobj *
varobj_add_child (struct varobj *var, const char *name, struct value *value);
+#endif /* HAVE_PYTHON */
+
/* C implementation */
static int c_number_of_children (struct varobj *var);
return delcount;
}
+#if HAVE_PYTHON
+
/* Convenience function for varobj_set_visualizer. Instantiate a
pretty-printer for a given value. */
static PyObject *
instantiate_pretty_printer (PyObject *constructor, struct value *value)
{
-#if HAVE_PYTHON
PyObject *val_obj = NULL;
PyObject *printer;
printer = PyObject_CallFunctionObjArgs (constructor, val_obj, NULL);
Py_DECREF (val_obj);
return printer;
-#endif
return NULL;
}
+#endif
+
/* Set/Get variable object display format */
enum varobj_display_formats
}
}
+#if HAVE_PYTHON
+
/* A helper for update_dynamic_varobj_children that installs a new
child when needed. */
}
}
-#if HAVE_PYTHON
-
static int
dynamic_varobj_has_child_method (struct varobj *var)
{
return var->children;
}
+#if HAVE_PYTHON
+
static struct varobj *
varobj_add_child (struct varobj *var, const char *name, struct value *value)
{
return v;
}
+#endif /* HAVE_PYTHON */
+
/* Obtain the type of an object Variable as a string similar to the one gdb
prints on the console */