Eliminate Float32 and Int32
Project: http://git-wip-us.apache.org/repos/asf/lucy-clownfish/repo Commit: http://git-wip-us.apache.org/repos/asf/lucy-clownfish/commit/28fbddeb Tree: http://git-wip-us.apache.org/repos/asf/lucy-clownfish/tree/28fbddeb Diff: http://git-wip-us.apache.org/repos/asf/lucy-clownfish/diff/28fbddeb Branch: refs/heads/master Commit: 28fbddebc3b588ffa1ce232a18d5a5e6b70a622f Parents: f9eb322 Author: Nick Wellnhofer <wellnho...@aevum.de> Authored: Thu Jul 9 14:10:05 2015 +0200 Committer: Nick Wellnhofer <wellnho...@aevum.de> Committed: Thu Jul 9 16:34:00 2015 +0200 ---------------------------------------------------------------------- runtime/c/src/clownfish.c | 14 --- runtime/core/Clownfish/Num.c | 92 --------------- runtime/core/Clownfish/Num.cfh | 75 ------------ runtime/core/Clownfish/Test/TestCharBuf.c | 6 +- runtime/core/Clownfish/Test/TestNum.c | 118 +++---------------- runtime/core/Clownfish/Test/TestVector.c | 2 +- runtime/go/ext/clownfish.c | 14 --- .../perl/buildlib/Clownfish/Build/Binding.pm | 29 ----- runtime/perl/xs/XSBind.c | 14 --- 9 files changed, 20 insertions(+), 344 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/lucy-clownfish/blob/28fbddeb/runtime/c/src/clownfish.c ---------------------------------------------------------------------- diff --git a/runtime/c/src/clownfish.c b/runtime/c/src/clownfish.c index e60eacc..362337a 100644 --- a/runtime/c/src/clownfish.c +++ b/runtime/c/src/clownfish.c @@ -307,13 +307,6 @@ Hash_To_Host_IMP(Hash *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); @@ -321,13 +314,6 @@ Float64_To_Host_IMP(Float64 *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); http://git-wip-us.apache.org/repos/asf/lucy-clownfish/blob/28fbddeb/runtime/core/Clownfish/Num.c ---------------------------------------------------------------------- diff --git a/runtime/core/Clownfish/Num.c b/runtime/core/Clownfish/Num.c index 23edd1e..c3f4777 100644 --- a/runtime/core/Clownfish/Num.c +++ b/runtime/core/Clownfish/Num.c @@ -17,9 +17,7 @@ #define C_CFISH_NUM #define C_CFISH_INTNUM #define C_CFISH_FLOATNUM -#define C_CFISH_INTEGER32 #define C_CFISH_INTEGER64 -#define C_CFISH_FLOAT32 #define C_CFISH_FLOAT64 #define CFISH_USE_SHORT_NAMES @@ -100,51 +98,6 @@ IntNum_To_String_IMP(IntNum *self) { /***************************************************************************/ -Float32* -Float32_new(float value) { - Float32 *self = (Float32*)Class_Make_Obj(FLOAT32); - return Float32_init(self, value); -} - -Float32* -Float32_init(Float32 *self, float value) { - self->value = value; - return (Float32*)FloatNum_init((FloatNum*)self); -} - -float -Float32_Get_Value_IMP(Float32 *self) { - return self->value; -} - -void -Float32_Set_Value_IMP(Float32 *self, float value) { - self->value = value; -} - -double -Float32_To_F64_IMP(Float32 *self) { - return self->value; -} - -int64_t -Float32_To_I64_IMP(Float32 *self) { - return (int64_t)self->value; -} - -Float32* -Float32_Clone_IMP(Float32 *self) { - return Float32_new(self->value); -} - -void -Float32_Mimic_IMP(Float32 *self, Obj *other) { - Float32 *twin = (Float32*)CERTIFY(other, FLOAT32); - self->value = twin->value; -} - -/***************************************************************************/ - Float64* Float64_new(double value) { Float64 *self = (Float64*)Class_Make_Obj(FLOAT64); @@ -190,51 +143,6 @@ Float64_Mimic_IMP(Float64 *self, Obj *other) { /***************************************************************************/ -Integer32* -Int32_new(int32_t value) { - Integer32 *self = (Integer32*)Class_Make_Obj(INTEGER32); - return Int32_init(self, value); -} - -Integer32* -Int32_init(Integer32 *self, int32_t value) { - self->value = value; - return (Integer32*)IntNum_init((IntNum*)self); -} - -int32_t -Int32_Get_Value_IMP(Integer32 *self) { - return self->value; -} - -void -Int32_Set_Value_IMP(Integer32 *self, int32_t value) { - self->value = value; -} - -double -Int32_To_F64_IMP(Integer32 *self) { - return self->value; -} - -int64_t -Int32_To_I64_IMP(Integer32 *self) { - return self->value; -} - -Integer32* -Int32_Clone_IMP(Integer32 *self) { - return Int32_new(self->value); -} - -void -Int32_Mimic_IMP(Integer32 *self, Obj *other) { - Integer32 *twin = (Integer32*)CERTIFY(other, INTEGER32); - self->value = twin->value; -} - -/***************************************************************************/ - Integer64* Int64_new(int64_t value) { Integer64 *self = (Integer64*)Class_Make_Obj(INTEGER64); http://git-wip-us.apache.org/repos/asf/lucy-clownfish/blob/28fbddeb/runtime/core/Clownfish/Num.cfh ---------------------------------------------------------------------- diff --git a/runtime/core/Clownfish/Num.cfh b/runtime/core/Clownfish/Num.cfh index 2c47bfd..61b4f7b 100644 --- a/runtime/core/Clownfish/Num.cfh +++ b/runtime/core/Clownfish/Num.cfh @@ -72,43 +72,6 @@ abstract class Clownfish::IntNum inherits Clownfish::Num { To_String(IntNum *self); } -/** Single precision floating point number. - */ -final class Clownfish::Float32 inherits Clownfish::FloatNum { - - float value; - - /** - * @param value Initial value. - */ - inert Float32* - init(Float32* self, float value); - - inert Float32* - new(float value); - - void* - To_Host(Float32 *self); - - void - Set_Value(Float32 *self, float value); - - float - Get_Value(Float32 *self); - - public int64_t - To_I64(Float32 *self); - - public double - To_F64(Float32 *self); - - public incremented Float32* - Clone(Float32 *self); - - public void - Mimic(Float32 *self, Obj *other); -} - /** Double precision floating point number. */ final class Clownfish::Float64 inherits Clownfish::FloatNum { @@ -146,44 +109,6 @@ final class Clownfish::Float64 inherits Clownfish::FloatNum { Mimic(Float64 *self, Obj *other); } -/** 32-bit signed integer. - */ -final class Clownfish::Integer32 nickname Int32 - inherits Clownfish::IntNum { - - int32_t value; - - /** - * @param value Initial value. - */ - inert Integer32* - init(Integer32* self, int32_t value); - - inert Integer32* - new(int32_t value); - - void* - To_Host(Integer32 *self); - - void - Set_Value(Integer32 *self, int32_t value); - - int32_t - Get_Value(Integer32 *self); - - public int64_t - To_I64(Integer32 *self); - - public double - To_F64(Integer32 *self); - - public incremented Integer32* - Clone(Integer32 *self); - - public void - Mimic(Integer32 *self, Obj *other); -} - /** * 64-bit signed integer. */ http://git-wip-us.apache.org/repos/asf/lucy-clownfish/blob/28fbddeb/runtime/core/Clownfish/Test/TestCharBuf.c ---------------------------------------------------------------------- diff --git a/runtime/core/Clownfish/Test/TestCharBuf.c b/runtime/core/Clownfish/Test/TestCharBuf.c index 22a60aa..fcce061 100644 --- a/runtime/core/Clownfish/Test/TestCharBuf.c +++ b/runtime/core/Clownfish/Test/TestCharBuf.c @@ -206,11 +206,11 @@ test_vcatf_str(TestBatchRunner *runner) { static void test_vcatf_obj(TestBatchRunner *runner) { String *wanted = S_get_str("ooga 20 booga"); - Integer32 *i32 = Int32_new(20); + Integer64 *i64 = Int64_new(20); CharBuf *got = S_get_cb("ooga"); - CB_catf(got, " %o booga", i32); + CB_catf(got, " %o booga", i64); TEST_TRUE(runner, S_cb_equals(got, wanted), "%%o Obj"); - DECREF(i32); + DECREF(i64); DECREF(wanted); DECREF(got); } http://git-wip-us.apache.org/repos/asf/lucy-clownfish/blob/28fbddeb/runtime/core/Clownfish/Test/TestNum.c ---------------------------------------------------------------------- diff --git a/runtime/core/Clownfish/Test/TestNum.c b/runtime/core/Clownfish/Test/TestNum.c index 1139987..9da7bb5 100644 --- a/runtime/core/Clownfish/Test/TestNum.c +++ b/runtime/core/Clownfish/Test/TestNum.c @@ -33,139 +33,80 @@ TestNum_new() { static void test_To_String(TestBatchRunner *runner) { - Float32 *f32 = Float32_new(1.33f); Float64 *f64 = Float64_new(1.33); - Integer32 *i32 = Int32_new(INT32_MAX); Integer64 *i64 = Int64_new(INT64_MAX); - String *f32_string = Float32_To_String(f32); String *f64_string = Float64_To_String(f64); - String *i32_string = Int32_To_String(i32); String *i64_string = Int64_To_String(i64); - TEST_TRUE(runner, Str_Starts_With_Utf8(f32_string, "1.3", 3), - "Float32_To_String"); TEST_TRUE(runner, Str_Starts_With_Utf8(f64_string, "1.3", 3), "Float64_To_String"); - TEST_TRUE(runner, Str_Equals_Utf8(i32_string, "2147483647", 10), - "Int32_To_String"); TEST_TRUE(runner, Str_Equals_Utf8(i64_string, "9223372036854775807", 19), "Int64_To_String"); DECREF(i64_string); - DECREF(i32_string); DECREF(f64_string); - DECREF(f32_string); DECREF(i64); - DECREF(i32); DECREF(f64); - DECREF(f32); } static void test_accessors(TestBatchRunner *runner) { - Float32 *f32 = Float32_new(1.0); Float64 *f64 = Float64_new(1.0); - Integer32 *i32 = Int32_new(1); Integer64 *i64 = Int64_new(1); - float wanted32 = 1.33f; double wanted64 = 1.33; - float got32; double got64; - Float32_Set_Value(f32, 1.33f); - TEST_FLOAT_EQ(runner, Float32_Get_Value(f32), 1.33f, - "F32 Set_Value Get_Value"); - Float64_Set_Value(f64, 1.33); got64 = Float64_Get_Value(f64); TEST_TRUE(runner, *(int64_t*)&got64 == *(int64_t*)&wanted64, "F64 Set_Value Get_Value"); - TEST_TRUE(runner, Float32_To_I64(f32) == 1, "Float32_To_I64"); TEST_TRUE(runner, Float64_To_I64(f64) == 1, "Float64_To_I64"); - got32 = (float)Float32_To_F64(f32); - TEST_TRUE(runner, *(int32_t*)&got32 == *(int32_t*)&wanted32, - "Float32_To_F64"); - got64 = Float64_To_F64(f64); TEST_TRUE(runner, *(int64_t*)&got64 == *(int64_t*)&wanted64, "Float64_To_F64"); - Int32_Set_Value(i32, INT32_MIN); - TEST_INT_EQ(runner, Int32_Get_Value(i32), INT32_MIN, - "I32 Set_Value Get_Value"); - Int64_Set_Value(i64, INT64_MIN); TEST_TRUE(runner, Int64_Get_Value(i64) == INT64_MIN, "I64 Set_Value Get_Value"); - Int32_Set_Value(i32, -1); Int64_Set_Value(i64, -1); - TEST_TRUE(runner, Int32_To_F64(i32) == -1, "Int32_To_F64"); TEST_TRUE(runner, Int64_To_F64(i64) == -1, "Int64_To_F64"); DECREF(i64); - DECREF(i32); DECREF(f64); - DECREF(f32); } static void test_Equals_and_Compare_To(TestBatchRunner *runner) { - Float32 *f32 = Float32_new(1.0); - Float64 *f64 = Float64_new(1.0); - Integer32 *i32 = Int32_new(INT32_MAX); + Float64 *f1 = Float64_new(1.0); + Float64 *f2 = Float64_new(1.0); Integer64 *i64 = Int64_new(INT64_MAX); - TEST_TRUE(runner, Float32_Compare_To(f32, (Obj*)f64) == 0, - "F32_Compare_To equal"); - TEST_TRUE(runner, Float32_Equals(f32, (Obj*)f64), - "F32_Equals equal"); - - Float64_Set_Value(f64, 2.0); - TEST_TRUE(runner, Float32_Compare_To(f32, (Obj*)f64) < 0, - "F32_Compare_To less than"); - TEST_FALSE(runner, Float32_Equals(f32, (Obj*)f64), - "F32_Equals less than"); - - Float64_Set_Value(f64, 0.0); - TEST_TRUE(runner, Float32_Compare_To(f32, (Obj*)f64) > 0, - "F32_Compare_To greater than"); - TEST_FALSE(runner, Float32_Equals(f32, (Obj*)f64), - "F32_Equals greater than"); - - Float64_Set_Value(f64, 1.0); - Float32_Set_Value(f32, 1.0); - TEST_TRUE(runner, Float64_Compare_To(f64, (Obj*)f32) == 0, + TEST_TRUE(runner, Float64_Compare_To(f1, (Obj*)f2) == 0, "F64_Compare_To equal"); - TEST_TRUE(runner, Float64_Equals(f64, (Obj*)f32), + TEST_TRUE(runner, Float64_Equals(f1, (Obj*)f2), "F64_Equals equal"); - Float32_Set_Value(f32, 2.0); - TEST_TRUE(runner, Float64_Compare_To(f64, (Obj*)f32) < 0, + Float64_Set_Value(f2, 2.0); + TEST_TRUE(runner, Float64_Compare_To(f1, (Obj*)f2) < 0, "F64_Compare_To less than"); - TEST_FALSE(runner, Float64_Equals(f64, (Obj*)f32), + TEST_FALSE(runner, Float64_Equals(f1, (Obj*)f2), "F64_Equals less than"); - Float32_Set_Value(f32, 0.0); - TEST_TRUE(runner, Float64_Compare_To(f64, (Obj*)f32) > 0, + Float64_Set_Value(f2, 0.0); + TEST_TRUE(runner, Float64_Compare_To(f1, (Obj*)f2) > 0, "F64_Compare_To greater than"); - TEST_FALSE(runner, Float64_Equals(f64, (Obj*)f32), + TEST_FALSE(runner, Float64_Equals(f1, (Obj*)f2), "F64_Equals greater than"); - Float64_Set_Value(f64, INT64_MAX * 2.0); - TEST_TRUE(runner, Float64_Compare_To(f64, (Obj*)i64) > 0, + Float64_Set_Value(f1, INT64_MAX * 2.0); + TEST_TRUE(runner, Float64_Compare_To(f1, (Obj*)i64) > 0, "Float64 comparison to Integer64"); - TEST_TRUE(runner, Int64_Compare_To(i64, (Obj*)f64) < 0, + TEST_TRUE(runner, Int64_Compare_To(i64, (Obj*)f1) < 0, "Integer64 comparison to Float64"); - Float32_Set_Value(f32, INT32_MAX * 2.0f); - TEST_TRUE(runner, Float32_Compare_To(f32, (Obj*)i32) > 0, - "Float32 comparison to Integer32"); - TEST_TRUE(runner, Int32_Compare_To(i32, (Obj*)f32) < 0, - "Integer32 comparison to Float32"); - Int64_Set_Value(i64, INT64_C(0x6666666666666666)); Integer64 *i64_copy = Int64_new(INT64_C(0x6666666666666666)); TEST_TRUE(runner, Int64_Compare_To(i64, (Obj*)i64_copy) == 0, @@ -173,74 +114,47 @@ test_Equals_and_Compare_To(TestBatchRunner *runner) { DECREF(i64_copy); DECREF(i64); - DECREF(i32); - DECREF(f64); - DECREF(f32); + DECREF(f1); + DECREF(f2); } static void test_Clone(TestBatchRunner *runner) { - Float32 *f32 = Float32_new(1.33f); Float64 *f64 = Float64_new(1.33); - Integer32 *i32 = Int32_new(INT32_MAX); Integer64 *i64 = Int64_new(INT64_MAX); - Float32 *f32_dupe = Float32_Clone(f32); Float64 *f64_dupe = Float64_Clone(f64); - Integer32 *i32_dupe = Int32_Clone(i32); Integer64 *i64_dupe = Int64_Clone(i64); - TEST_TRUE(runner, Float32_Equals(f32, (Obj*)f32_dupe), - "Float32 Clone"); TEST_TRUE(runner, Float64_Equals(f64, (Obj*)f64_dupe), "Float64 Clone"); - TEST_TRUE(runner, Int32_Equals(i32, (Obj*)i32_dupe), - "Integer32 Clone"); TEST_TRUE(runner, Int64_Equals(i64, (Obj*)i64_dupe), "Integer64 Clone"); DECREF(i64_dupe); - DECREF(i32_dupe); DECREF(f64_dupe); - DECREF(f32_dupe); DECREF(i64); - DECREF(i32); DECREF(f64); - DECREF(f32); } static void test_Mimic(TestBatchRunner *runner) { - Float32 *f32 = Float32_new(1.33f); Float64 *f64 = Float64_new(1.33); - Integer32 *i32 = Int32_new(INT32_MAX); Integer64 *i64 = Int64_new(INT64_MAX); - Float32 *f32_dupe = Float32_new(0.0f); Float64 *f64_dupe = Float64_new(0.0); - Integer32 *i32_dupe = Int32_new(0); Integer64 *i64_dupe = Int64_new(0); - Float32_Mimic(f32_dupe, (Obj*)f32); Float64_Mimic(f64_dupe, (Obj*)f64); - Int32_Mimic(i32_dupe, (Obj*)i32); Int64_Mimic(i64_dupe, (Obj*)i64); - TEST_TRUE(runner, Float32_Equals(f32, (Obj*)f32_dupe), - "Float32 Mimic"); TEST_TRUE(runner, Float64_Equals(f64, (Obj*)f64_dupe), "Float64 Mimic"); - TEST_TRUE(runner, Int32_Equals(i32, (Obj*)i32_dupe), - "Integer32 Mimic"); TEST_TRUE(runner, Int64_Equals(i64, (Obj*)i64_dupe), "Integer64 Mimic"); DECREF(i64_dupe); - DECREF(i32_dupe); DECREF(f64_dupe); - DECREF(f32_dupe); DECREF(i64); - DECREF(i32); DECREF(f64); - DECREF(f32); } void TestNum_Run_IMP(TestNum *self, TestBatchRunner *runner) { - TestBatchRunner_Plan(runner, (TestBatch*)self, 39); + TestBatchRunner_Plan(runner, (TestBatch*)self, 20); test_To_String(runner); test_accessors(runner); test_Equals_and_Compare_To(runner); http://git-wip-us.apache.org/repos/asf/lucy-clownfish/blob/28fbddeb/runtime/core/Clownfish/Test/TestVector.c ---------------------------------------------------------------------- diff --git a/runtime/core/Clownfish/Test/TestVector.c b/runtime/core/Clownfish/Test/TestVector.c index 79d8958..3e19014 100644 --- a/runtime/core/Clownfish/Test/TestVector.c +++ b/runtime/core/Clownfish/Test/TestVector.c @@ -347,7 +347,7 @@ test_Clone(TestBatchRunner *runner) { uint32_t i; for (i = 0; i < 10; i++) { - Vec_Push(array, (Obj*)Int32_new(i)); + Vec_Push(array, (Obj*)Int64_new(i)); } Vec_Push(array, NULL); twin = Vec_Clone(array); http://git-wip-us.apache.org/repos/asf/lucy-clownfish/blob/28fbddeb/runtime/go/ext/clownfish.c ---------------------------------------------------------------------- diff --git a/runtime/go/ext/clownfish.c b/runtime/go/ext/clownfish.c index 0a2fa5d..5059789 100644 --- a/runtime/go/ext/clownfish.c +++ b/runtime/go/ext/clownfish.c @@ -277,13 +277,6 @@ Hash_To_Host_IMP(Hash *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); @@ -291,13 +284,6 @@ Float64_To_Host_IMP(Float64 *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); http://git-wip-us.apache.org/repos/asf/lucy-clownfish/blob/28fbddeb/runtime/perl/buildlib/Clownfish/Build/Binding.pm ---------------------------------------------------------------------- diff --git a/runtime/perl/buildlib/Clownfish/Build/Binding.pm b/runtime/perl/buildlib/Clownfish/Build/Binding.pm index 309f7e8..43d5b68 100644 --- a/runtime/perl/buildlib/Clownfish/Build/Binding.pm +++ b/runtime/perl/buildlib/Clownfish/Build/Binding.pm @@ -29,7 +29,6 @@ sub bind_all { $class->bind_string; $class->bind_err; $class->bind_hash; - $class->bind_float32; $class->bind_float64; $class->bind_obj; $class->bind_varray; @@ -324,34 +323,6 @@ END_XS_CODE Clownfish::CFC::Binding::Perl::Class->register($binding); } -sub bind_float32 { - my $float32_xs_code = <<'END_XS_CODE'; -MODULE = Clownfish PACKAGE = Clownfish::Float32 - -SV* -new(either_sv, value) - SV *either_sv; - float value; -CODE: -{ - cfish_Float32 *self - = (cfish_Float32*)XSBind_new_blank_obj(aTHX_ either_sv); - cfish_Float32_init(self, value); - RETVAL = CFISH_OBJ_TO_SV_NOINC(self); -} -OUTPUT: RETVAL -END_XS_CODE - - my $binding = Clownfish::CFC::Binding::Perl::Class->new( - parcel => "Clownfish", - class_name => "Clownfish::Float32", - ); - $binding->append_xs($float32_xs_code); - $binding->exclude_constructor; - - Clownfish::CFC::Binding::Perl::Class->register($binding); -} - sub bind_float64 { my $float64_xs_code = <<'END_XS_CODE'; MODULE = Clownfish PACKAGE = Clownfish::Float64 http://git-wip-us.apache.org/repos/asf/lucy-clownfish/blob/28fbddeb/runtime/perl/xs/XSBind.c ---------------------------------------------------------------------- diff --git a/runtime/perl/xs/XSBind.c b/runtime/perl/xs/XSBind.c index f500f34..9eb5f4f 100644 --- a/runtime/perl/xs/XSBind.c +++ b/runtime/perl/xs/XSBind.c @@ -19,9 +19,7 @@ #define C_CFISH_OBJ #define C_CFISH_CLASS -#define C_CFISH_FLOAT32 #define C_CFISH_FLOAT64 -#define C_CFISH_INTEGER32 #define C_CFISH_INTEGER64 #define C_CFISH_BOOLEAN #define NEED_newRV_noinc @@ -1008,24 +1006,12 @@ CFISH_Hash_To_Host_IMP(cfish_Hash *self) { /****************************** Clownfish::Num ******************************/ void* -CFISH_Float32_To_Host_IMP(cfish_Float32 *self) { - dTHX; - return newSVnv(self->value); -} - -void* CFISH_Float64_To_Host_IMP(cfish_Float64 *self) { dTHX; return newSVnv(self->value); } void* -CFISH_Int32_To_Host_IMP(cfish_Integer32 *self) { - dTHX; - return newSViv((IV)self->value); -} - -void* CFISH_Int64_To_Host_IMP(cfish_Integer64 *self) { dTHX; SV *sv = NULL;