Changeset ab88b05 for mainwin.c


Ignore:
Timestamp:
Jan 23, 2012, 5:27:42 PM (10 years ago)
Author:
Jason Gross <jgross@mit.edu>
Branches:
master, release-1.9
Children:
219f52c
Parents:
8135737
git-author:
Jason Gross <jgross@mit.edu> (07/23/11 22:33:17)
git-committer:
Jason Gross <jgross@mit.edu> (01/23/12 17:27:42)
Message:
Allocate the mainwin on the heap

This lets us return NULL from owl_global_get_mainwin before the mainwin
has been initilized.

Since g has static duration, g.mw is automatically initialized to NULL.
File:
1 edited

Legend:

Unmodified
Added
Removed
  • mainwin.c

    r099597c rab88b05  
    44static void owl_mainwin_resized(owl_window *w, void *user_data);
    55
    6 void owl_mainwin_init(owl_mainwin *mw, owl_window *window)
     6CALLER_OWN owl_mainwin *owl_mainwin_new(owl_window *window)
    77{
     8  owl_mainwin *mw = g_new(owl_mainwin, 1);
    89  mw->curtruncated=0;
    910  mw->lastdisplayed=-1;
     
    1617  /* For now, we do not bother with connecting up dependencies; that'll be a
    1718   * future refactor of the mainwin */
     19
     20  return mw;
    1821}
    1922
Note: See TracChangeset for help on using the changeset viewer.