This is the mail archive of the archer@sourceware.org mailing list for the Archer project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[python] minor #if consistency change


This changes a couple files to use #if HAVE_PYTHON rather than #ifdef.

This is not very important, just a small bit of consistency.

Tom

2009-01-12  Tom Tromey  <tromey@redhat.com>

	* varobj.c (instantiate_pretty_printer): Use #if, not #ifdef.
	* main.c (captured_main): Use #if, not #ifdef.
	(print_gdb_help): Likewise.

diff --git a/gdb/main.c b/gdb/main.c
index e039e0b..1dc6eee 100644
--- a/gdb/main.c
+++ b/gdb/main.c
@@ -397,7 +397,7 @@ captured_main (void *data)
       {"args", no_argument, &set_args, 1},
      {"l", required_argument, 0, 'l'},
       {"return-child-result", no_argument, &return_child_result, 1},
-#ifdef HAVE_PYTHON
+#if HAVE_PYTHON
       {"python", no_argument, 0, 'P'},
       {"P", no_argument, 0, 'P'},
 #endif
@@ -901,7 +901,7 @@ Can't attach to process and specify a core file at the same time."));
 #endif
     }
 
-#ifdef HAVE_PYTHON
+#if HAVE_PYTHON
   if (python_script)
     {
       extern int pagination_enabled;
@@ -946,7 +946,7 @@ print_gdb_help (struct ui_file *stream)
 This is the GNU debugger.  Usage:\n\n\
     gdb [options] [executable-file [core-file or process-id]]\n\
     gdb [options] --args executable-file [inferior-arguments ...]\n"), stream);
-#ifdef HAVE_PYTHON
+#if HAVE_PYTHON
   fputs_unfiltered (_("\
     gdb [options] [--python|-P] script-file [script-arguments ...]\n"), stream);
 #endif
@@ -989,7 +989,7 @@ Options:\n\n\
   --nx               Do not read "), stream);
   fputs_unfiltered (gdbinit, stream);
   fputs_unfiltered (_(" file.\n"), stream);
-#ifdef HAVE_PYTHON
+#if HAVE_PYTHON
   fputs_unfiltered (_("\
   --python, -P       Following argument is Python script file; remaining\n\
                      arguments are passed to script.\n"), stream);
diff --git a/gdb/varobj.c b/gdb/varobj.c
index 3471639..7f77902 100644
--- a/gdb/varobj.c
+++ b/gdb/varobj.c
@@ -715,7 +715,7 @@ varobj_delete (struct varobj *var, char ***dellist, int only_children)
 static PyObject *
 instantiate_pretty_printer (struct varobj *var, struct value *value)
 {
-#ifdef HAVE_PYTHON
+#if HAVE_PYTHON
   if (var->constructor)
     {
       PyObject *printer = gdbpy_instantiate_printer (var->constructor, value);


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]