comparison th_ioctx.c @ 772:1959ba53e9dc

Fix th_ioctx_t_ops -> th_ioctx_ops_t
author Matti Hamalainen <ccr@tnsp.org>
date Mon, 20 Feb 2023 23:36:33 +0200
parents c17eadc60c3d
children
comparison
equal deleted inserted replaced
771:c17eadc60c3d 772:1959ba53e9dc
30 ctx->fops = &th_stdio_io_ops; 30 ctx->fops = &th_stdio_io_ops;
31 ctx->data = (void *) fh; 31 ctx->data = (void *) fh;
32 } 32 }
33 33
34 34
35 th_ioctx_t * th_io_new(const th_ioctx_t_ops *fops, const char *filename, const char *mode) 35 th_ioctx_t * th_io_new(const th_ioctx_ops_t *fops, const char *filename, const char *mode)
36 { 36 {
37 th_ioctx_t *ctx = th_malloc(sizeof(th_ioctx_t)); 37 th_ioctx_t *ctx = th_malloc(sizeof(th_ioctx_t));
38 if (ctx == NULL) 38 if (ctx == NULL)
39 return NULL; 39 return NULL;
40 40
59 th_io_close(ctx); 59 th_io_close(ctx);
60 return NULL; 60 return NULL;
61 } 61 }
62 62
63 63
64 int th_io_fopen(th_ioctx_t **pctx, const th_ioctx_t_ops *fops, const char *filename, const char *mode) 64 int th_io_fopen(th_ioctx_t **pctx, const th_ioctx_ops_t *fops, const char *filename, const char *mode)
65 { 65 {
66 th_ioctx_t *ctx; 66 th_ioctx_t *ctx;
67 int res; 67 int res;
68 68
69 if ((*pctx = ctx = th_io_new(fops, filename, mode)) == NULL) 69 if ((*pctx = ctx = th_io_new(fops, filename, mode)) == NULL)