summaryrefslogtreecommitdiff
path: root/pbstream.c
diff options
context:
space:
mode:
authorJoshua Haberman <joshua@reverberate.org>2009-02-24 10:36:34 -0800
committerJoshua Haberman <joshua@reverberate.org>2009-02-24 10:36:34 -0800
commitecd855279d0984b3c0191ce1e60f0b4690af2f39 (patch)
treeb2e4b93bc9f3d30a55f25d35f135e4c45a7b4231 /pbstream.c
parent7fefc5c8756fc7568371cffe66cbc0136c6eb31b (diff)
Removed CALLBACK() macro and struct of callbacks.
Diffstat (limited to 'pbstream.c')
-rw-r--r--pbstream.c10
1 files changed, 3 insertions, 7 deletions
diff --git a/pbstream.c b/pbstream.c
index 2046ec7..5994b9c 100644
--- a/pbstream.c
+++ b/pbstream.c
@@ -243,14 +243,10 @@ static pbstream_status_t parse_unknown_value(
return PBSTREAM_STATUS_OK;
}
-#define CALLBACK(s, func, ...) do { \
- if(s->callbacks.func) s->callbacks.func(__VA_ARGS__); \
- } while (0)
-
#define NONFATAL_ERROR(s, code) do { \
- if(s->ignore_nonfatal_errors) CALLBACK(s, error_callback, code); \
- else return code; \
- } while (0)
+ if(s->ignore_nonfatal_errors) { \
+ if(s->error_callback) s->error_callback(s, code); \
+ } else return code; } while (0)
static struct pbstream_field_descriptor *find_field_descriptor(
struct pbstream_message_descriptor* md,
generated by cgit on debian on lair
contact matthew@masot.net with questions or feedback