diff options
Diffstat (limited to 'pez.h')
| -rw-r--r-- | pez.h | 3 |
1 files changed, 2 insertions, 1 deletions
@@ -33,6 +33,7 @@ typedef enum PezError { typedef struct PezContext PezContext; typedef void *PezAllocFn(void *userdata, void *ptr, size_t oldsize, size_t newsize); typedef bool PezCFn(PezContext *, int argc); +typedef int PezReadFn(void *userdata, char *dst, int n); PezContext *pez_new(PezAllocFn *alloc, void *userdata, size_t stacksize); void pez_del(PezContext *); @@ -49,7 +50,7 @@ void pez_debug(PezContext *, const char *opts); int pez_geterrno(PezContext *); const char *pez_geterr(PezContext *cx); -bool pez_eval_cb(PezContext *, const char *fname, int (*cb)(void *), void *); +bool pez_eval_cb(PezContext *, const char *fname, PezReadFn cb, void *); bool pez_eval_str(PezContext *, const char *fname, const char *); bool pez_eval_file(PezContext *, const char *path, FILE *); |