}
#undef io_add_notify
-enum io_notify_result io_add_notify(const char *path, io_callback_t *callback,
- void *context, struct io **io_r)
+enum io_notify_result
+io_add_notify(const char *path, unsigned int source_linenum,
+ io_callback_t *callback, void *context, struct io **io_r)
{
struct ioloop_notify_handler_context *ctx =
current_ioloop->notify_handler_context;
}
*io_r = io_notify_fd_add(&ctx->fd_ctx, wd, callback, context);
+ (*io_r)->source_linenum = source_linenum;
return IO_NOTIFY_ADDED;
}
}
#undef io_add_notify
-enum io_notify_result io_add_notify(const char *path, io_callback_t *callback,
- void *context, struct io **io_r)
+enum io_notify_result
+io_add_notify(const char *path, unsigned int source_linenum,
+ io_callback_t *callback, void *context, struct io **io_r)
{
struct ioloop_notify_handler_context *ctx =
current_ioloop->notify_handler_context;
io = i_new(struct io_notify, 1);
io->io.condition = IO_NOTIFY;
+ io->io.source_linenum = source_linenum;
io->io.callback = callback;
io->io.context = context;
io->io.ioloop = current_ioloop;
#undef io_add_notify
enum io_notify_result
io_add_notify(const char *path ATTR_UNUSED,
+ unsigned int source_linenum ATTR_UNUSED,
io_callback_t *callback ATTR_UNUSED,
void *context ATTR_UNUSED, struct io **io_r)
{
CALLBACK_TYPECHECK(callback, void (*)(typeof(context))), \
(io_callback_t *)callback, context)
enum io_notify_result
-io_add_notify(const char *path, io_callback_t *callback,
- void *context, struct io **io_r) ATTR_NULL(3);
+io_add_notify(const char *path, unsigned int source_linenum,
+ io_callback_t *callback, void *context,
+ struct io **io_r) ATTR_NULL(3);
#define io_add_notify(path, callback, context, io_r) \
- io_add_notify(path + \
+ io_add_notify(path, __LINE__ + \
CALLBACK_TYPECHECK(callback, void (*)(typeof(context))), \
(io_callback_t *)callback, context, io_r)
struct io *io_add_istream(struct istream *input, unsigned int source_linenum,