Files
smart-records/src/smart_records_internals.h

18 lines
549 B
C
Raw Normal View History

#ifndef SMART_RECORDS_INTERNALS_H
#define SMART_RECORDS_INTERNALS_H
/*
* Small helper to populate char **error and jump to failed label.
*/
#define set_error_and_fails(x) { if (error) *error = strdup(x); goto failed; }
typedef struct smart_records_ctx_t {
void *CTX;
int (*set_format) (struct smart_records_ctx_t *ctx, char **error, const char *fmt);
int (*write_record) (struct smart_records_ctx_t *ctx, char **error, va_list ap);
int (*close_records_base) (struct smart_records_ctx_t *ctx);
} smart_records_ctx_t ;
#endif