Changeset b15cbc4


Ignore:
Timestamp:
2020-03-17T11:29:47Z (5 months ago)
Author:
Petr Vaněk <arkamar@…>
Branches:
master
Children:
c479242
Parents:
3a547ee
Message:

Make the irc test work with libevent

Files:
4 edited

Legend:

Unmodified
Added
Removed
  • lib/events.h

    r3a547ee rb15cbc4  
    7070G_MODULE_EXPORT void b_main_quit();
    7171
     72G_MODULE_EXPORT void b_main_iteration();
     73
    7274
    7375/* Add event handlers (for I/O or a timeout). The event handler will be called
  • lib/events_glib.c

    r3a547ee rb15cbc4  
    6363{
    6464        g_main_quit(loop);
     65}
     66
     67void b_main_iteration()
     68{
     69        g_main_iteration(FALSE);
     70        event_debug("b_main_iteration()\n");
    6571}
    6672
  • lib/events_libevent.c

    r3a547ee rb15cbc4  
    112112
    113113        b_main_restart();
     114}
     115
     116void b_main_iteration()
     117{
     118        event_base_loop(leh, EVLOOP_NONBLOCK);
     119        event_debug("b_main_iteration()\n");
    114120}
    115121
  • tests/check_irc.c

    r3a547ee rb15cbc4  
    66#include <stdio.h>
    77#include "irc.h"
     8#include "events.h"
    89#include "testsuite.h"
    910
     
    4344    fail_unless(g_io_channel_flush(ch2, NULL) == G_IO_STATUS_NORMAL);
    4445
    45     g_main_iteration(FALSE);
     46    b_main_iteration();
    4647    irc_free(irc);
    4748
Note: See TracChangeset for help on using the changeset viewer.