Implement To_Host methods for C bindings
Project: http://git-wip-us.apache.org/repos/asf/lucy-clownfish/repo Commit: http://git-wip-us.apache.org/repos/asf/lucy-clownfish/commit/d448dd7f Tree: http://git-wip-us.apache.org/repos/asf/lucy-clownfish/tree/d448dd7f Diff: http://git-wip-us.apache.org/repos/asf/lucy-clownfish/diff/d448dd7f Branch: refs/heads/master Commit: d448dd7f44d53d7ca960a7d2312a644de1b87093 Parents: e543561 Author: Nick Wellnhofer <[email protected]> Authored: Fri May 29 18:10:32 2015 +0200 Committer: Nick Wellnhofer <[email protected]> Committed: Fri May 29 18:10:32 2015 +0200 ---------------------------------------------------------------------- runtime/c/src/Clownfish/Obj.c | 74 ++++++++++++++++++++++++++++++++++++++ 1 file changed, 74 insertions(+) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/lucy-clownfish/blob/d448dd7f/runtime/c/src/Clownfish/Obj.c ---------------------------------------------------------------------- diff --git a/runtime/c/src/Clownfish/Obj.c b/runtime/c/src/Clownfish/Obj.c index 4b753cb..a037ff1 100644 --- a/runtime/c/src/Clownfish/Obj.c +++ b/runtime/c/src/Clownfish/Obj.c @@ -22,8 +22,13 @@ #include "Clownfish/Obj.h" #include "Clownfish/Class.h" +#include "Clownfish/Blob.h" +#include "Clownfish/ByteBuf.h" #include "Clownfish/Err.h" +#include "Clownfish/Hash.h" +#include "Clownfish/Num.h" #include "Clownfish/String.h" +#include "Clownfish/Vector.h" static CFISH_INLINE bool SI_immortal(cfish_Class *klass) { @@ -108,4 +113,73 @@ Obj_To_Host_IMP(Obj *self) { UNREACHABLE_RETURN(void*); } +void* +Str_To_Host_IMP(String *self) { + Str_To_Host_t super_to_host + = SUPER_METHOD_PTR(STRING, CFISH_Str_To_Host); + return super_to_host(self); +} + +void* +Blob_To_Host_IMP(Blob *self) { + Blob_To_Host_t super_to_host + = SUPER_METHOD_PTR(BLOB, CFISH_Blob_To_Host); + return super_to_host(self); +} + +void* +BB_To_Host_IMP(ByteBuf *self) { + BB_To_Host_t super_to_host + = SUPER_METHOD_PTR(BYTEBUF, CFISH_BB_To_Host); + return super_to_host(self); +} + +void* +Vec_To_Host_IMP(Vector *self) { + Vec_To_Host_t super_to_host + = SUPER_METHOD_PTR(VECTOR, CFISH_Vec_To_Host); + return super_to_host(self); +} + +void* +Hash_To_Host_IMP(Hash *self) { + Hash_To_Host_t super_to_host + = SUPER_METHOD_PTR(HASH, CFISH_Hash_To_Host); + return super_to_host(self); +} + +void* +Float32_To_Host_IMP(Float32 *self) { + Float32_To_Host_t super_to_host + = SUPER_METHOD_PTR(FLOAT32, CFISH_Float32_To_Host); + return super_to_host(self); +} + +void* +Float64_To_Host_IMP(Float64 *self) { + Float64_To_Host_t super_to_host + = SUPER_METHOD_PTR(FLOAT64, CFISH_Float64_To_Host); + return super_to_host(self); +} + +void* +Int32_To_Host_IMP(Integer32 *self) { + Int32_To_Host_t super_to_host + = SUPER_METHOD_PTR(INTEGER32, CFISH_Int32_To_Host); + return super_to_host(self); +} + +void* +Int64_To_Host_IMP(Integer64 *self) { + Int64_To_Host_t super_to_host + = SUPER_METHOD_PTR(INTEGER64, CFISH_Int64_To_Host); + return super_to_host(self); +} + +void* +Bool_To_Host_IMP(BoolNum *self) { + Bool_To_Host_t super_to_host + = SUPER_METHOD_PTR(BOOLNUM, CFISH_Bool_To_Host); + return super_to_host(self); +}
