summaryrefslogtreecommitdiff
path: root/src/upb_decoder.h
diff options
context:
space:
mode:
authorJoshua Haberman <jhaberman@gmail.com>2011-06-17 10:34:29 -0700
committerJoshua Haberman <jhaberman@gmail.com>2011-06-17 10:34:29 -0700
commit559e23c796f973a65d05c76e211835b126ee8ac8 (patch)
treeec359628f3b93b88718cc34e5ec86ca6e6c6c1e2 /src/upb_decoder.h
parenta503b8859c37906ab5012db163daca43bfe393bb (diff)
Major refactoring: abandon upb_msg, add upb_accessors.
Next on the chopping block is upb_string.
Diffstat (limited to 'src/upb_decoder.h')
-rw-r--r--src/upb_decoder.h12
1 files changed, 10 insertions, 2 deletions
diff --git a/src/upb_decoder.h b/src/upb_decoder.h
index a98b235..e9bc0b4 100644
--- a/src/upb_decoder.h
+++ b/src/upb_decoder.h
@@ -91,8 +91,16 @@ typedef struct {
struct _upb_decoder;
typedef struct _upb_decoder upb_decoder;
-// Allocates and frees a upb_decoder, respectively.
-void upb_decoder_init(upb_decoder *d, upb_handlers *handlers);
+// Initializes/uninitializes a decoder for calling into the given handlers
+// or to write into the given msgdef, given its accessors). Takes a ref
+// on the handlers or msgdef.
+void upb_decoder_initforhandlers(upb_decoder *d, upb_handlers *h);
+
+// Equivalent to:
+// upb_accessors_reghandlers(m, h);
+// upb_decoder_initforhandlers(d, h);
+// except possibly more efficient, by using cached state in the msgdef.
+void upb_decoder_initformsgdef(upb_decoder *d, upb_msgdef *m);
void upb_decoder_uninit(upb_decoder *d);
// Resets the internal state of an already-allocated decoder. This puts it in a
generated by cgit on debian on lair
contact matthew@masot.net with questions or feedback