Changeset 96828e4 for select.c


Ignore:
Timestamp:
Feb 11, 2011, 4:31:33 PM (10 years ago)
Author:
Anders Kaseorg <andersk@mit.edu>
Branches:
master, release-1.8, release-1.9
Children:
35b6eb9
Parents:
9518a85
git-author:
Anders Kaseorg <andersk@mit.edu> (08/27/09 00:51:45)
git-committer:
Anders Kaseorg <andersk@mit.edu> (02/11/11 16:31:33)
Message:
Replace owl_malloc with g_new and g_new0.

Signed-off-by: Anders Kaseorg <andersk@mit.edu>
Reviewed-by: Karl Ramm <kcr@mit.edu>
File:
1 edited

Legend:

Unmodified
Added
Removed
  • select.c

    ra409a9d r96828e4  
    1515owl_timer *owl_select_add_timer(const char* name, int after, int interval, void (*cb)(owl_timer *, void *), void (*destroy)(owl_timer*), void *data)
    1616{
    17   owl_timer *t = owl_malloc(sizeof(owl_timer));
     17  owl_timer *t = g_new(owl_timer, 1);
    1818  GList **timers = owl_global_get_timerlist(&g);
    1919
     
    159159const owl_io_dispatch *owl_select_add_io_dispatch(int fd, int mode, void (*cb)(const owl_io_dispatch *, void *), void (*destroy)(const owl_io_dispatch *), void *data)
    160160{
    161   owl_io_dispatch *d = owl_malloc(sizeof(owl_io_dispatch));
     161  owl_io_dispatch *d = g_new(owl_io_dispatch, 1);
    162162  owl_list *dl = owl_global_get_io_dispatch_list(&g);
    163163
     
    299299owl_ps_action *owl_select_add_pre_select_action(int (*cb)(owl_ps_action *, void *), void (*destroy)(owl_ps_action *), void *data)
    300300{
    301   owl_ps_action *a = owl_malloc(sizeof(owl_ps_action));
     301  owl_ps_action *a = g_new(owl_ps_action, 1);
    302302  owl_list *psa_list = owl_global_get_psa_list(&g);
    303303  a->needs_gc = 0;
Note: See TracChangeset for help on using the changeset viewer.