mirror of
https://github.com/cuberite/libevent.git
synced 2025-09-10 13:04:23 -04:00
Make regress_finalize work with malloc replacement disabled
This commit is contained in:
parent
cbfc35f6b9
commit
b48c7bf8a6
@ -158,6 +158,7 @@ end:
|
|||||||
;
|
;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#ifndef EVENT__DISABLE_MM_REPLACEMENT
|
||||||
static void *
|
static void *
|
||||||
tfff_malloc(size_t n)
|
tfff_malloc(size_t n)
|
||||||
{
|
{
|
||||||
@ -181,12 +182,15 @@ tfff_realloc(void *p, size_t sz)
|
|||||||
{
|
{
|
||||||
return realloc(p,sz);
|
return realloc(p,sz);
|
||||||
}
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
static void
|
static void
|
||||||
test_fin_free_finalize(void *arg)
|
test_fin_free_finalize(void *arg)
|
||||||
{
|
{
|
||||||
|
#ifdef EVENT__DISABLE_MM_REPLACEMENT
|
||||||
|
tinytest_set_test_skipped_();
|
||||||
|
#else
|
||||||
struct event_base *base = NULL;
|
struct event_base *base = NULL;
|
||||||
|
|
||||||
struct event *ev, *ev2;
|
struct event *ev, *ev2;
|
||||||
int ev_called = 0;
|
int ev_called = 0;
|
||||||
int ev2_called = 0;
|
int ev2_called = 0;
|
||||||
@ -218,6 +222,7 @@ test_fin_free_finalize(void *arg)
|
|||||||
end:
|
end:
|
||||||
if (base)
|
if (base)
|
||||||
event_base_free(base);
|
event_base_free(base);
|
||||||
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
/* For test_fin_within_cb */
|
/* For test_fin_within_cb */
|
||||||
|
Loading…
x
Reference in New Issue
Block a user