summaryrefslogtreecommitdiff
path: root/src/upb_glue.h
diff options
context:
space:
mode:
authorJoshua Haberman <jhaberman@gmail.com>2011-07-14 23:15:00 -0700
committerJoshua Haberman <jhaberman@gmail.com>2011-07-14 23:15:00 -0700
commit6a1f3a66939308668ab8dce0d195afec16e02af9 (patch)
tree8d1236c0d7269caa1ece95bfe584afe9b550c006 /src/upb_glue.h
parent559e23c796f973a65d05c76e211835b126ee8ac8 (diff)
Major refactoring: upb_string is gone in favor of upb_strref.
Diffstat (limited to 'src/upb_glue.h')
-rw-r--r--src/upb_glue.h20
1 files changed, 12 insertions, 8 deletions
diff --git a/src/upb_glue.h b/src/upb_glue.h
index 27611cd..0448c2f 100644
--- a/src/upb_glue.h
+++ b/src/upb_glue.h
@@ -27,6 +27,7 @@
#define UPB_GLUE_H
#include <stdbool.h>
+#include "upb.h"
#ifdef __cplusplus
extern "C" {
@@ -36,20 +37,23 @@ extern "C" {
// Clients should use the regular, typedef'd names (eg. upb_string).
struct _upb_msg;
struct _upb_msgdef;
-struct _upb_status;
-struct _upb_string;
struct _upb_symtab;
// Decodes the given string, which must be in protobuf binary format, to the
// given upb_msg with msgdef "md", storing the status of the operation in "s".
-void upb_strtomsg(struct _upb_string *str, void *msg,
- struct _upb_msgdef *md, struct _upb_status *s);
+void upb_strtomsg(const char *str, size_t len, void *msg,
+ struct _upb_msgdef *md, upb_status *s);
-void upb_msgtotext(struct _upb_string *str, void *msg,
- struct _upb_msgdef *md, bool single_line);
+//void upb_msgtotext(struct _upb_string *str, void *msg,
+// struct _upb_msgdef *md, bool single_line);
-void upb_read_descriptor(struct _upb_symtab *symtab, struct _upb_string *str,
- struct _upb_status *status);
+void upb_read_descriptor(struct _upb_symtab *symtab, const char *str, size_t len,
+ upb_status *status);
+
+void upb_read_descriptorfile(struct _upb_symtab *symtab, const char *fname,
+ upb_status *status);
+
+char *upb_readfile(const char *filename, size_t *len);
#ifdef __cplusplus
} /* extern "C" */
generated by cgit on debian on lair
contact matthew@masot.net with questions or feedback