diff options
| author | kr.angelov <kr.angelov@gmail.com> | 2012-01-20 13:41:10 +0000 |
|---|---|---|
| committer | kr.angelov <kr.angelov@gmail.com> | 2012-01-20 13:41:10 +0000 |
| commit | 2eee382a62a909d5a3f2f5eda94f30fe68fd5335 (patch) | |
| tree | b0b0d513535895f244214aebf6358e172b8dce6d /src/runtime/c/gu/dump.h | |
| parent | b9728357126f8b9a6311cca17d9f0dcc2a7bfb9b (diff) | |
initial import of the C runtime
Diffstat (limited to 'src/runtime/c/gu/dump.h')
| -rw-r--r-- | src/runtime/c/gu/dump.h | 34 |
1 files changed, 34 insertions, 0 deletions
diff --git a/src/runtime/c/gu/dump.h b/src/runtime/c/gu/dump.h new file mode 100644 index 000000000..7d6f10a77 --- /dev/null +++ b/src/runtime/c/gu/dump.h @@ -0,0 +1,34 @@ +#ifndef GU_DUMP_H_ +#define GU_DUMP_H_ + +#include <gu/defs.h> +#include <gu/yaml.h> +#include <gu/type.h> +#include <gu/map.h> + +typedef struct GuDump GuDump; + +struct GuDump { + GuPool* pool; + GuYaml* yaml; + GuMap* data; + GuTypeMap* dumpers; + bool print_address; +}; + +typedef void (*GuDumpFn)(GuFn* self, GuType* type, const void* value, GuDump* ctx); + +GuDump* +gu_new_dump(GuWriter* wtr, GuTypeTable* dumpers, GuExn* err, GuPool* pool); + +void +gu_dump(GuType* type, const void* value, GuDump* ctx); + +void +gu_dump_stderr(GuType* type, const void* value, GuExn* err); + +extern GuTypeTable +gu_dump_table; + + +#endif // GU_DUMP_H_ |
