unofficial mirror of emacs-devel@gnu.org 
 help / color / mirror / code / Atom feed
* wrong behaviour of <struct frame>
@ 2010-12-02  8:54 alin soare
  2010-12-02  9:12 ` Jan Djärv
                   ` (2 more replies)
  0 siblings, 3 replies; 5+ messages in thread
From: alin soare @ 2010-12-02  8:54 UTC (permalink / raw
  To: emacs-devel

I defined within the struct frame an integer variable

int ct;

If I define it immediately after the menu_bar_vector, it is initialized
somewhere with the pointer value of Qnil. (&Qnil)

      Only the X toolkit version uses this.  */

   Lisp_Object menu_bar_vector;
+
+    int ct;


In this case, if I change the value f->ct, emacs crashes with segmentation
fault, generated by the garbage collector. Why , as time as I initialize a
variable defined by myself ?


-----------------------------------------

If I define it at the end of struct frame, id est immediately after the
fieldforeground_pixel,

/* All display backends seem to need these two pixel values. */
  unsigned long background_pixel;
  unsigned long foreground_pixel;
+
+    int ct;
}

everything works fine in that case.

I wish to ask you to suggest me if you can, what happens when I define the var.
'ct' inside the struct frame.



Alin.






^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2010-12-02 13:14 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-12-02  8:54 wrong behaviour of <struct frame> alin soare
2010-12-02  9:12 ` Jan Djärv
2010-12-02  9:14   ` Alin Soare
2010-12-02  9:45 ` martin rudalics
2010-12-02 13:14 ` Andreas Schwab

Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).