]> git.eshelyaron.com Git - emacs.git/commitdiff
[MULTI_PERDISPLAY] (get_perdisplay): Define this as a macro, for sources that
authorKarl Heuer <kwzh@gnu.org>
Tue, 31 Jan 1995 01:53:55 +0000 (01:53 +0000)
committerKarl Heuer <kwzh@gnu.org>
Tue, 31 Jan 1995 01:53:55 +0000 (01:53 +0000)
include this header.
[MULTI_PERDISPLAY] (get_perdisplay_macro): Internal macro version.

src/xterm.h

index 5d40b1f3fa30cc7ee0ff052839cb823e0b5ffa31..9b90e9536f7c1ca2ba29aef67796953812b13957 100644 (file)
@@ -305,6 +305,16 @@ extern struct x_display_info *x_display_info_for_display ();
 extern struct x_display_info *x_display_info_for_name ();
 
 extern struct x_display_info *x_term_init ();
+
+#ifdef MULTI_PERDISPLAY
+/* The perdisplay structure itself has to be accessible in files that don't
+   need to know about X.  So we'll define get_perdisplay as a function to
+   retrieve that structure opaquely.  But sources that include this header
+   will automatically get the macro version, and save a function call.  */
+
+#define get_perdisplay_macro(f) (&(f)->display.x->display_info->perdisplay)
+#define get_perdisplay(f) get_perdisplay_macro (f)
+#endif
 \f
 /* Each X frame object points to its own struct x_display object
    in the display.x field.  The x_display structure contains all