Пример #1
0
fa_io_filter_t fa_io_create_T_filter()
{
    struct filter *filter = fa_new_struct(T_filter);
    prepare(filter);
    // TODO free filter
    return fa_io_create_simple_filter(push, pull, filter);
}
Пример #2
0
fa_error_t fa_error_copy_simple(simple_fa_error_t simple)
{
    fa_ptr_t simple_error_impl(fa_id_t interface);
    simple_fa_error_t e  = fa_new_struct(simple_error);
    e->impl     = &simple_error_impl;
    e->severity = simple->severity;
    e->message  = fa_copy(simple->message);
    e->origin   = simple->origin ? fa_copy(simple->origin) : NULL;
    return (fa_error_t) e;
}
Пример #3
0
Файл: clock.c Проект: EQ4/faudio
static fa_clock_t new_standard_clock()
{
    fa_ptr_t standard_clock_impl(fa_id_t interface);
    standard_fa_clock_t c = fa_new_struct(standard_clock);

    c->impl = &standard_clock_impl;
    c->origin.milliseconds = raw_milliseconds();
    c->origin.time         = raw_time();

    return (fa_clock_t) c;
	return NULL;
}
Пример #4
0
fa_error_t fa_error_create_simple(
    fa_error_severity_t    severity,
    fa_string_t            message,
    fa_string_t            origin
)
{
    fa_ptr_t simple_error_impl(fa_id_t interface);
    simple_fa_error_t e  = fa_new_struct(simple_error);
    e->impl     = &simple_error_impl;
    e->severity = severity;
    e->message  = message;
    e->origin   = origin;
    return (fa_error_t) e;
}