File Coverage

lib/Clownfish.xs
Criterion Covered Total %
statement 613 1866 32.8
branch 93 476 19.5
condition n/a
subroutine n/a
pod n/a
total 706 2342 30.1


line stmt bran cond sub pod time code
1            
2            
3            

perltidy

4            
 
5             /* * *********************************************** * * !!!! DO NOT EDIT !!!! * * This file was auto-generated by Build.PL. * * *********************************************** * * Licensed to the Apache Software Foundation (ASF) under one or more * contributor license agreements. See the NOTICE file distributed with * this work for additional information regarding copyright ownership. * The ASF licenses this file to You under the Apache License, Version 2.0 * (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ #define CFP_CFISH #include "XSBind.h" #include "cfish_perl.h" #include "Clownfish/Obj.h" #include "Clownfish/Blob.h" #include "Clownfish/TestHarness/TestSuiteRunner.h" #include "Clownfish/TestHarness/TestBatchRunner.h" #include "Clownfish/TestHarness/TestSuite.h" #include "Clownfish/TestHarness/TestBatch.h" #include "Clownfish/TestHarness/TestFormatter.h" #include "Clownfish/TestHarness/TestFormatter.h" #include "Clownfish/TestHarness/TestFormatter.h" #include "Clownfish/Num.h" #include "Clownfish/Num.h" #include "Clownfish/Vector.h" #include "Clownfish/Hash.h" #include "Clownfish/Class.h" #include "Clownfish/ByteBuf.h" #include "Clownfish/CharBuf.h" #include "Clownfish/Boolean.h" #include "Clownfish/HashIterator.h" #include "Clownfish/Method.h" #include "Clownfish/String.h" #include "Clownfish/String.h" #include "Clownfish/Err.h" #include "Clownfish/TestHarness/TestUtils.h" #include "Clownfish/Util/SortUtils.h" #include "Clownfish/Util/Memory.h" #ifndef XS_INTERNAL #define XS_INTERNAL XS #endif XS_INTERNAL(XS_Clownfish_Obj_new); XS_INTERNAL(XS_Clownfish_Obj_new) { dXSARGS; cfish_Obj* arg_self; cfish_Obj* retval; CFISH_UNUSED_VAR(cv); if (items != 1) { XSBind_invalid_args_error(aTHX_ cv, "class_name, ..."); } SP -= items; arg_self = (cfish_Obj*)XSBind_new_blank_obj(aTHX_ ST(0)); retval = cfish_Obj_init(arg_self); ST(0) = sv_2mortal(CFISH_OBJ_TO_SV_NOINC(retval)); XSRETURN(1); } XS_INTERNAL(XS_Clownfish_Obj_clone); XS_INTERNAL(XS_Clownfish_Obj_clone) { dXSARGS; cfish_Obj* arg_self; CFISH_Obj_Clone_t method; cfish_Obj* retval; CFISH_UNUSED_VAR(cv); SP -= items; if (items != 1) { XSBind_invalid_args_error(aTHX_ cv, "self"); } /* Extract vars from Perl stack. */ arg_self = (cfish_Obj*)XSBind_perl_to_cfish_noinc(aTHX_ ST(0), CFISH_OBJ, NULL); /* Execute */ method = CFISH_METHOD_PTR(CFISH_OBJ, CFISH_Obj_Clone); retval = method(arg_self); ST(0) = XSBind_cfish_to_perl(aTHX_ (cfish_Obj*)retval); CFISH_DECREF(retval); sv_2mortal( ST(0) ); XSRETURN(1); } XS_INTERNAL(XS_Clownfish_Obj_equals); XS_INTERNAL(XS_Clownfish_Obj_equals) { dXSARGS; SV *sv; cfish_Obj* arg_self; cfish_Obj* arg_other; CFISH_Obj_Equals_t method; bool retval; CFISH_UNUSED_VAR(cv); SP -= items; if (items != 2) { XSBind_invalid_args_error(aTHX_ cv, "self, other"); } /* Extract vars from Perl stack. */ arg_self = (cfish_Obj*)XSBind_perl_to_cfish_noinc(aTHX_ ST(0), CFISH_OBJ, NULL); sv = ST(1); arg_other = (cfish_Obj*)XSBind_arg_to_cfish(aTHX_ sv, "other", CFISH_OBJ, CFISH_ALLOCA_OBJ(CFISH_STRING)); /* Execute */ method = CFISH_METHOD_PTR(CFISH_OBJ, CFISH_Obj_Equals); retval = method(arg_self, arg_other); ST(0) = newSViv(retval); sv_2mortal( ST(0) ); XSRETURN(1); } XS_INTERNAL(XS_Clownfish_Obj_compare_to); XS_INTERNAL(XS_Clownfish_Obj_compare_to) { dXSARGS; SV *sv; cfish_Obj* arg_self; cfish_Obj* arg_other; CFISH_Obj_Compare_To_t method; int32_t retval; CFISH_UNUSED_VAR(cv); SP -= items; if (items != 2) { XSBind_invalid_args_error(aTHX_ cv, "self, other"); } /* Extract vars from Perl stack. */ arg_self = (cfish_Obj*)XSBind_perl_to_cfish_noinc(aTHX_ ST(0), CFISH_OBJ, NULL); sv = ST(1); arg_other = (cfish_Obj*)XSBind_arg_to_cfish(aTHX_ sv, "other", CFISH_OBJ, CFISH_ALLOCA_OBJ(CFISH_STRING)); /* Execute */ method = CFISH_METHOD_PTR(CFISH_OBJ, CFISH_Obj_Compare_To); retval = method(arg_self, arg_other); ST(0) = newSViv(retval); sv_2mortal( ST(0) ); XSRETURN(1); } XS_INTERNAL(XS_Clownfish_Obj_DESTROY); XS_INTERNAL(XS_Clownfish_Obj_DESTROY) { dXSARGS; cfish_Obj* arg_self; CFISH_Obj_Destroy_t method; CFISH_UNUSED_VAR(cv); SP -= items; if (items != 1) { XSBind_invalid_args_error(aTHX_ cv, "self"); } /* Extract vars from Perl stack. */ arg_self = (cfish_Obj*)XSBind_perl_to_cfish_noinc(aTHX_ ST(0), CFISH_OBJ, NULL); /* Execute */ method = CFISH_METHOD_PTR(CFISH_OBJ, CFISH_Obj_Destroy); method(arg_self); XSRETURN(0); } XS_INTERNAL(XS_Clownfish_Obj_to_string); XS_INTERNAL(XS_Clownfish_Obj_to_string) { dXSARGS; cfish_Obj* arg_self; CFISH_Obj_To_String_t method; cfish_String* retval; CFISH_UNUSED_VAR(cv); SP -= items; if (items != 1) { XSBind_invalid_args_error(aTHX_ cv, "self"); } /* Extract vars from Perl stack. */ arg_self = (cfish_Obj*)XSBind_perl_to_cfish_noinc(aTHX_ ST(0), CFISH_OBJ, NULL); /* Execute */ method = CFISH_METHOD_PTR(CFISH_OBJ, CFISH_Obj_To_String); retval = method(arg_self); ST(0) = XSBind_cfish_to_perl(aTHX_ (cfish_Obj*)retval); CFISH_DECREF(retval); sv_2mortal( ST(0) ); XSRETURN(1); } XS_INTERNAL(XS_Clownfish_Blob_get_size); XS_INTERNAL(XS_Clownfish_Blob_get_size) { dXSARGS; cfish_Blob* arg_self; CFISH_Blob_Get_Size_t method; size_t retval; CFISH_UNUSED_VAR(cv); SP -= items; if (items != 1) { XSBind_invalid_args_error(aTHX_ cv, "self"); } /* Extract vars from Perl stack. */ arg_self = (cfish_Blob*)XSBind_perl_to_cfish_noinc(aTHX_ ST(0), CFISH_BLOB, NULL); /* Execute */ method = CFISH_METHOD_PTR(CFISH_BLOB, CFISH_Blob_Get_Size); retval = method(arg_self); ST(0) = newSViv(retval); sv_2mortal( ST(0) ); XSRETURN(1); } XS_INTERNAL(XS_Clownfish_Blob_equals); XS_INTERNAL(XS_Clownfish_Blob_equals) { dXSARGS; SV *sv; cfish_Blob* arg_self; cfish_Obj* arg_other; CFISH_Blob_Equals_t method; bool retval; CFISH_UNUSED_VAR(cv); SP -= items; if (items != 2) { XSBind_invalid_args_error(aTHX_ cv, "self, other"); } /* Extract vars from Perl stack. */ arg_self = (cfish_Blob*)XSBind_perl_to_cfish_noinc(aTHX_ ST(0), CFISH_BLOB, NULL); sv = ST(1); arg_other = (cfish_Obj*)XSBind_arg_to_cfish(aTHX_ sv, "other", CFISH_OBJ, CFISH_ALLOCA_OBJ(CFISH_STRING)); /* Execute */ method = CFISH_METHOD_PTR(CFISH_BLOB, CFISH_Blob_Equals); retval = method(arg_self, arg_other); ST(0) = newSViv(retval); sv_2mortal( ST(0) ); XSRETURN(1); } XS_INTERNAL(XS_Clownfish_Blob_compare_to); XS_INTERNAL(XS_Clownfish_Blob_compare_to) { dXSARGS; SV *sv; cfish_Blob* arg_self; cfish_Obj* arg_other; CFISH_Blob_Compare_To_t method; int32_t retval; CFISH_UNUSED_VAR(cv); SP -= items; if (items != 2) { XSBind_invalid_args_error(aTHX_ cv, "self, other"); } /* Extract vars from Perl stack. */ arg_self = (cfish_Blob*)XSBind_perl_to_cfish_noinc(aTHX_ ST(0), CFISH_BLOB, NULL); sv = ST(1); arg_other = (cfish_Obj*)XSBind_arg_to_cfish(aTHX_ sv, "other", CFISH_OBJ, CFISH_ALLOCA_OBJ(CFISH_STRING)); /* Execute */ method = CFISH_METHOD_PTR(CFISH_BLOB, CFISH_Blob_Compare_To); retval = method(arg_self, arg_other); ST(0) = newSViv(retval); sv_2mortal( ST(0) ); XSRETURN(1); } XS_INTERNAL(XS_Clownfish_Blob_clone); XS_INTERNAL(XS_Clownfish_Blob_clone) { dXSARGS; cfish_Blob* arg_self; CFISH_Blob_Clone_t method; cfish_Blob* retval; CFISH_UNUSED_VAR(cv); SP -= items; if (items != 1) { XSBind_invalid_args_error(aTHX_ cv, "self"); } /* Extract vars from Perl stack. */ arg_self = (cfish_Blob*)XSBind_perl_to_cfish_noinc(aTHX_ ST(0), CFISH_BLOB, NULL); /* Execute */ method = CFISH_METHOD_PTR(CFISH_BLOB, CFISH_Blob_Clone); retval = method(arg_self); ST(0) = XSBind_cfish_to_perl(aTHX_ (cfish_Obj*)retval); CFISH_DECREF(retval); sv_2mortal( ST(0) ); XSRETURN(1); } XS_INTERNAL(XS_Clownfish_Blob_DESTROY); XS_INTERNAL(XS_Clownfish_Blob_DESTROY) { dXSARGS; cfish_Blob* arg_self; CFISH_Blob_Destroy_t method; CFISH_UNUSED_VAR(cv); SP -= items; if (items != 1) { XSBind_invalid_args_error(aTHX_ cv, "self"); } /* Extract vars from Perl stack. */ arg_self = (cfish_Blob*)XSBind_perl_to_cfish_noinc(aTHX_ ST(0), CFISH_BLOB, NULL); /* Execute */ method = CFISH_METHOD_PTR(CFISH_BLOB, CFISH_Blob_Destroy); method(arg_self); XSRETURN(0); } XS_INTERNAL(XS_Clownfish_TestHarness_TestSuiteRunner_new); XS_INTERNAL(XS_Clownfish_TestHarness_TestSuiteRunner_new) { dXSARGS; static const XSBind_ParamSpec param_specs[1] = { XSBIND_PARAM("formatter", 1) }; int32_t locations[1]; SV *sv; cfish_TestSuiteRunner* arg_self; cfish_TestFormatter* arg_formatter; cfish_TestSuiteRunner* retval; CFISH_UNUSED_VAR(cv); if (items < 1) { XSBind_invalid_args_error(aTHX_ cv, "class_name, ..."); } SP -= items; XSBind_locate_args(aTHX_ &ST(0), 1, items, param_specs, locations, 1); sv = ST(locations[0]); arg_formatter = (cfish_TestFormatter*)XSBind_arg_to_cfish(aTHX_ sv, "formatter", CFISH_TESTFORMATTER, NULL); arg_self = (cfish_TestSuiteRunner*)XSBind_new_blank_obj(aTHX_ ST(0)); retval = cfish_TestSuiteRunner_init(arg_self, arg_formatter); ST(0) = sv_2mortal(CFISH_OBJ_TO_SV_NOINC(retval)); XSRETURN(1); } XS_INTERNAL(XS_Clownfish_TestHarness_TestSuiteRunner_DESTROY); XS_INTERNAL(XS_Clownfish_TestHarness_TestSuiteRunner_DESTROY) { dXSARGS; cfish_TestSuiteRunner* arg_self; CFISH_TestSuiteRunner_Destroy_t method; CFISH_UNUSED_VAR(cv); SP -= items; if (items != 1) { XSBind_invalid_args_error(aTHX_ cv, "self"); } /* Extract vars from Perl stack. */ arg_self = (cfish_TestSuiteRunner*)XSBind_perl_to_cfish_noinc(aTHX_ ST(0), CFISH_TESTSUITERUNNER, NULL); /* Execute */ method = CFISH_METHOD_PTR(CFISH_TESTSUITERUNNER, CFISH_TestSuiteRunner_Destroy); method(arg_self); XSRETURN(0); } XS_INTERNAL(XS_Clownfish_TestHarness_TestSuiteRunner_run_batch); XS_INTERNAL(XS_Clownfish_TestHarness_TestSuiteRunner_run_batch) { dXSARGS; SV *sv; cfish_TestSuiteRunner* arg_self; cfish_TestBatch* arg_batch; CFISH_TestSuiteRunner_Run_Batch_t method; bool retval; CFISH_UNUSED_VAR(cv); SP -= items; if (items != 2) { XSBind_invalid_args_error(aTHX_ cv, "self, batch"); } /* Extract vars from Perl stack. */ arg_self = (cfish_TestSuiteRunner*)XSBind_perl_to_cfish_noinc(aTHX_ ST(0), CFISH_TESTSUITERUNNER, NULL); sv = ST(1); arg_batch = (cfish_TestBatch*)XSBind_arg_to_cfish(aTHX_ sv, "batch", CFISH_TESTBATCH, NULL); /* Execute */ method = CFISH_METHOD_PTR(CFISH_TESTSUITERUNNER, CFISH_TestSuiteRunner_Run_Batch); retval = method(arg_self, arg_batch); ST(0) = newSViv(retval); sv_2mortal( ST(0) ); XSRETURN(1); } XS_INTERNAL(XS_Clownfish_TestHarness_TestSuiteRunner_finish); XS_INTERNAL(XS_Clownfish_TestHarness_TestSuiteRunner_finish) { dXSARGS; cfish_TestSuiteRunner* arg_self; CFISH_TestSuiteRunner_Finish_t method; bool retval; CFISH_UNUSED_VAR(cv); SP -= items; if (items != 1) { XSBind_invalid_args_error(aTHX_ cv, "self"); } /* Extract vars from Perl stack. */ arg_self = (cfish_TestSuiteRunner*)XSBind_perl_to_cfish_noinc(aTHX_ ST(0), CFISH_TESTSUITERUNNER, NULL); /* Execute */ method = CFISH_METHOD_PTR(CFISH_TESTSUITERUNNER, CFISH_TestSuiteRunner_Finish); retval = method(arg_self); ST(0) = newSViv(retval); sv_2mortal( ST(0) ); XSRETURN(1); } XS_INTERNAL(XS_Clownfish_TestHarness_TestSuiteRunner_get_num_tests); XS_INTERNAL(XS_Clownfish_TestHarness_TestSuiteRunner_get_num_tests) { dXSARGS; cfish_TestSuiteRunner* arg_self; CFISH_TestSuiteRunner_Get_Num_Tests_t method; uint32_t retval; CFISH_UNUSED_VAR(cv); SP -= items; if (items != 1) { XSBind_invalid_args_error(aTHX_ cv, "self"); } /* Extract vars from Perl stack. */ arg_self = (cfish_TestSuiteRunner*)XSBind_perl_to_cfish_noinc(aTHX_ ST(0), CFISH_TESTSUITERUNNER, NULL); /* Execute */ method = CFISH_METHOD_PTR(CFISH_TESTSUITERUNNER, CFISH_TestSuiteRunner_Get_Num_Tests); retval = method(arg_self); ST(0) = newSVuv(retval); sv_2mortal( ST(0) ); XSRETURN(1); } XS_INTERNAL(XS_Clownfish_TestHarness_TestSuiteRunner_get_num_tests_failed); XS_INTERNAL(XS_Clownfish_TestHarness_TestSuiteRunner_get_num_tests_failed) { dXSARGS; cfish_TestSuiteRunner* arg_self; CFISH_TestSuiteRunner_Get_Num_Tests_Failed_t method; uint32_t retval; CFISH_UNUSED_VAR(cv); SP -= items; if (items != 1) { XSBind_invalid_args_error(aTHX_ cv, "self"); } /* Extract vars from Perl stack. */ arg_self = (cfish_TestSuiteRunner*)XSBind_perl_to_cfish_noinc(aTHX_ ST(0), CFISH_TESTSUITERUNNER, NULL); /* Execute */ method = CFISH_METHOD_PTR(CFISH_TESTSUITERUNNER, CFISH_TestSuiteRunner_Get_Num_Tests_Failed); retval = method(arg_self); ST(0) = newSVuv(retval); sv_2mortal( ST(0) ); XSRETURN(1); } XS_INTERNAL(XS_Clownfish_TestHarness_TestSuiteRunner_get_num_batches); XS_INTERNAL(XS_Clownfish_TestHarness_TestSuiteRunner_get_num_batches) { dXSARGS; cfish_TestSuiteRunner* arg_self; CFISH_TestSuiteRunner_Get_Num_Batches_t method; uint32_t retval; CFISH_UNUSED_VAR(cv); SP -= items; if (items != 1) { XSBind_invalid_args_error(aTHX_ cv, "self"); } /* Extract vars from Perl stack. */ arg_self = (cfish_TestSuiteRunner*)XSBind_perl_to_cfish_noinc(aTHX_ ST(0), CFISH_TESTSUITERUNNER, NULL); /* Execute */ method = CFISH_METHOD_PTR(CFISH_TESTSUITERUNNER, CFISH_TestSuiteRunner_Get_Num_Batches); retval = method(arg_self); ST(0) = newSVuv(retval); sv_2mortal( ST(0) ); XSRETURN(1); } XS_INTERNAL(XS_Clownfish_TestHarness_TestSuiteRunner_get_num_batches_failed); XS_INTERNAL(XS_Clownfish_TestHarness_TestSuiteRunner_get_num_batches_failed) { dXSARGS; cfish_TestSuiteRunner* arg_self; CFISH_TestSuiteRunner_Get_Num_Batches_Failed_t method; uint32_t retval; CFISH_UNUSED_VAR(cv); SP -= items; if (items != 1) { XSBind_invalid_args_error(aTHX_ cv, "self"); } /* Extract vars from Perl stack. */ arg_self = (cfish_TestSuiteRunner*)XSBind_perl_to_cfish_noinc(aTHX_ ST(0), CFISH_TESTSUITERUNNER, NULL); /* Execute */ method = CFISH_METHOD_PTR(CFISH_TESTSUITERUNNER, CFISH_TestSuiteRunner_Get_Num_Batches_Failed); retval = method(arg_self); ST(0) = newSVuv(retval); sv_2mortal( ST(0) ); XSRETURN(1); } XS_INTERNAL(XS_Clownfish_TestHarness_TestBatchRunner_new); XS_INTERNAL(XS_Clownfish_TestHarness_TestBatchRunner_new) { dXSARGS; static const XSBind_ParamSpec param_specs[1] = { XSBIND_PARAM("formatter", 1) }; int32_t locations[1]; SV *sv; cfish_TestBatchRunner* arg_self; cfish_TestFormatter* arg_formatter; cfish_TestBatchRunner* retval; CFISH_UNUSED_VAR(cv); if (items < 1) { XSBind_invalid_args_error(aTHX_ cv, "class_name, ..."); } SP -= items; XSBind_locate_args(aTHX_ &ST(0), 1, items, param_specs, locations, 1); sv = ST(locations[0]); arg_formatter = (cfish_TestFormatter*)XSBind_arg_to_cfish(aTHX_ sv, "formatter", CFISH_TESTFORMATTER, NULL); arg_self = (cfish_TestBatchRunner*)XSBind_new_blank_obj(aTHX_ ST(0)); retval = cfish_TestBatchRunner_init(arg_self, arg_formatter); ST(0) = sv_2mortal(CFISH_OBJ_TO_SV_NOINC(retval)); XSRETURN(1); } XS_INTERNAL(XS_Clownfish_TestHarness_TestBatchRunner_DESTROY); XS_INTERNAL(XS_Clownfish_TestHarness_TestBatchRunner_DESTROY) { dXSARGS; cfish_TestBatchRunner* arg_self; CFISH_TestBatchRunner_Destroy_t method; CFISH_UNUSED_VAR(cv); SP -= items; if (items != 1) { XSBind_invalid_args_error(aTHX_ cv, "self"); } /* Extract vars from Perl stack. */ arg_self = (cfish_TestBatchRunner*)XSBind_perl_to_cfish_noinc(aTHX_ ST(0), CFISH_TESTBATCHRUNNER, NULL); /* Execute */ method = CFISH_METHOD_PTR(CFISH_TESTBATCHRUNNER, CFISH_TestBatchRunner_Destroy); method(arg_self); XSRETURN(0); } XS_INTERNAL(XS_Clownfish_TestHarness_TestBatchRunner_run_batch); XS_INTERNAL(XS_Clownfish_TestHarness_TestBatchRunner_run_batch) { dXSARGS; SV *sv; cfish_TestBatchRunner* arg_self; cfish_TestBatch* arg_batch; CFISH_TestBatchRunner_Run_Batch_t method; bool retval; CFISH_UNUSED_VAR(cv); SP -= items; if (items != 2) { XSBind_invalid_args_error(aTHX_ cv, "self, batch"); } /* Extract vars from Perl stack. */ arg_self = (cfish_TestBatchRunner*)XSBind_perl_to_cfish_noinc(aTHX_ ST(0), CFISH_TESTBATCHRUNNER, NULL); sv = ST(1); arg_batch = (cfish_TestBatch*)XSBind_arg_to_cfish(aTHX_ sv, "batch", CFISH_TESTBATCH, NULL); /* Execute */ method = CFISH_METHOD_PTR(CFISH_TESTBATCHRUNNER, CFISH_TestBatchRunner_Run_Batch); retval = method(arg_self, arg_batch); ST(0) = newSViv(retval); sv_2mortal( ST(0) ); XSRETURN(1); } XS_INTERNAL(XS_Clownfish_TestHarness_TestBatchRunner_plan); XS_INTERNAL(XS_Clownfish_TestHarness_TestBatchRunner_plan) { dXSARGS; static const XSBind_ParamSpec param_specs[2] = { XSBIND_PARAM("batch", 1), XSBIND_PARAM("num_planned", 1) }; int32_t locations[2]; SV *sv; cfish_TestBatchRunner* arg_self; cfish_TestBatch* arg_batch; uint32_t arg_num_planned; CFISH_TestBatchRunner_Plan_t method; CFISH_UNUSED_VAR(cv); if (items < 1) { XSBind_invalid_args_error(aTHX_ cv, "self, ..."); } SP -= items; /* Locate args on Perl stack. */ XSBind_locate_args(aTHX_ &ST(0), 1, items, param_specs, locations, 2); arg_self = (cfish_TestBatchRunner*)XSBind_perl_to_cfish_noinc(aTHX_ ST(0), CFISH_TESTBATCHRUNNER, NULL); sv = ST(locations[0]); arg_batch = (cfish_TestBatch*)XSBind_arg_to_cfish(aTHX_ sv, "batch", CFISH_TESTBATCH, NULL); sv = ST(locations[1]); if (!XSBind_sv_defined(aTHX_ sv)) { XSBind_undef_arg_error(aTHX_ "num_planned"); } arg_num_planned = (uint32_t)SvUV(sv); /* Execute */ method = CFISH_METHOD_PTR(CFISH_TESTBATCHRUNNER, CFISH_TestBatchRunner_Plan); method(arg_self, arg_batch, arg_num_planned); XSRETURN(0); } XS_INTERNAL(XS_Clownfish_TestHarness_TestBatchRunner_get_num_planned); XS_INTERNAL(XS_Clownfish_TestHarness_TestBatchRunner_get_num_planned) { dXSARGS; cfish_TestBatchRunner* arg_self; CFISH_TestBatchRunner_Get_Num_Planned_t method; uint32_t retval; CFISH_UNUSED_VAR(cv); SP -= items; if (items != 1) { XSBind_invalid_args_error(aTHX_ cv, "self"); } /* Extract vars from Perl stack. */ arg_self = (cfish_TestBatchRunner*)XSBind_perl_to_cfish_noinc(aTHX_ ST(0), CFISH_TESTBATCHRUNNER, NULL); /* Execute */ method = CFISH_METHOD_PTR(CFISH_TESTBATCHRUNNER, CFISH_TestBatchRunner_Get_Num_Planned); retval = method(arg_self); ST(0) = newSVuv(retval); sv_2mortal( ST(0) ); XSRETURN(1); } XS_INTERNAL(XS_Clownfish_TestHarness_TestBatchRunner_get_num_tests); XS_INTERNAL(XS_Clownfish_TestHarness_TestBatchRunner_get_num_tests) { dXSARGS; cfish_TestBatchRunner* arg_self; CFISH_TestBatchRunner_Get_Num_Tests_t method; uint32_t retval; CFISH_UNUSED_VAR(cv); SP -= items; if (items != 1) { XSBind_invalid_args_error(aTHX_ cv, "self"); } /* Extract vars from Perl stack. */ arg_self = (cfish_TestBatchRunner*)XSBind_perl_to_cfish_noinc(aTHX_ ST(0), CFISH_TESTBATCHRUNNER, NULL); /* Execute */ method = CFISH_METHOD_PTR(CFISH_TESTBATCHRUNNER, CFISH_TestBatchRunner_Get_Num_Tests); retval = method(arg_self); ST(0) = newSVuv(retval); sv_2mortal( ST(0) ); XSRETURN(1); } XS_INTERNAL(XS_Clownfish_TestHarness_TestBatchRunner_get_num_failed); XS_INTERNAL(XS_Clownfish_TestHarness_TestBatchRunner_get_num_failed) { dXSARGS; cfish_TestBatchRunner* arg_self; CFISH_TestBatchRunner_Get_Num_Failed_t method; uint32_t retval; CFISH_UNUSED_VAR(cv); SP -= items; if (items != 1) { XSBind_invalid_args_error(aTHX_ cv, "self"); } /* Extract vars from Perl stack. */ arg_self = (cfish_TestBatchRunner*)XSBind_perl_to_cfish_noinc(aTHX_ ST(0), CFISH_TESTBATCHRUNNER, NULL); /* Execute */ method = CFISH_METHOD_PTR(CFISH_TESTBATCHRUNNER, CFISH_TestBatchRunner_Get_Num_Failed); retval = method(arg_self); ST(0) = newSVuv(retval); sv_2mortal( ST(0) ); XSRETURN(1); } XS_INTERNAL(XS_Clownfish_TestHarness_TestSuite_new); XS_INTERNAL(XS_Clownfish_TestHarness_TestSuite_new) { dXSARGS; cfish_TestSuite* arg_self; cfish_TestSuite* retval; CFISH_UNUSED_VAR(cv); if (items != 1) { XSBind_invalid_args_error(aTHX_ cv, "class_name, ..."); } SP -= items; arg_self = (cfish_TestSuite*)XSBind_new_blank_obj(aTHX_ ST(0)); retval = cfish_TestSuite_init(arg_self); ST(0) = sv_2mortal(CFISH_OBJ_TO_SV_NOINC(retval)); XSRETURN(1); } XS_INTERNAL(XS_Clownfish_TestHarness_TestSuite_DESTROY); XS_INTERNAL(XS_Clownfish_TestHarness_TestSuite_DESTROY) { dXSARGS; cfish_TestSuite* arg_self; CFISH_TestSuite_Destroy_t method; CFISH_UNUSED_VAR(cv); SP -= items; if (items != 1) { XSBind_invalid_args_error(aTHX_ cv, "self"); } /* Extract vars from Perl stack. */ arg_self = (cfish_TestSuite*)XSBind_perl_to_cfish_noinc(aTHX_ ST(0), CFISH_TESTSUITE, NULL); /* Execute */ method = CFISH_METHOD_PTR(CFISH_TESTSUITE, CFISH_TestSuite_Destroy); method(arg_self); XSRETURN(0); } XS_INTERNAL(XS_Clownfish_TestHarness_TestSuite_add_batch); XS_INTERNAL(XS_Clownfish_TestHarness_TestSuite_add_batch) { dXSARGS; SV *sv; cfish_TestSuite* arg_self; cfish_TestBatch* arg_batch; CFISH_TestSuite_Add_Batch_t method; CFISH_UNUSED_VAR(cv); SP -= items; if (items != 2) { XSBind_invalid_args_error(aTHX_ cv, "self, batch"); } /* Extract vars from Perl stack. */ arg_self = (cfish_TestSuite*)XSBind_perl_to_cfish_noinc(aTHX_ ST(0), CFISH_TESTSUITE, NULL); sv = ST(1); arg_batch = (cfish_TestBatch*)XSBind_arg_to_cfish(aTHX_ sv, "batch", CFISH_TESTBATCH, NULL); /* Execute */ method = CFISH_METHOD_PTR(CFISH_TESTSUITE, CFISH_TestSuite_Add_Batch); arg_batch = (cfish_TestBatch*)CFISH_INCREF(arg_batch); method(arg_self, arg_batch); XSRETURN(0); } XS_INTERNAL(XS_Clownfish_TestHarness_TestSuite_run_batch); XS_INTERNAL(XS_Clownfish_TestHarness_TestSuite_run_batch) { dXSARGS; static const XSBind_ParamSpec param_specs[2] = { XSBIND_PARAM("class_name", 1), XSBIND_PARAM("formatter", 1) }; int32_t locations[2]; SV *sv; cfish_TestSuite* arg_self; cfish_String* arg_class_name; cfish_TestFormatter* arg_formatter; CFISH_TestSuite_Run_Batch_t method; bool retval; CFISH_UNUSED_VAR(cv); if (items < 1) { XSBind_invalid_args_error(aTHX_ cv, "self, ..."); } SP -= items; /* Locate args on Perl stack. */ XSBind_locate_args(aTHX_ &ST(0), 1, items, param_specs, locations, 2); arg_self = (cfish_TestSuite*)XSBind_perl_to_cfish_noinc(aTHX_ ST(0), CFISH_TESTSUITE, NULL); sv = ST(locations[0]); arg_class_name = (cfish_String*)XSBind_arg_to_cfish(aTHX_ sv, "class_name", CFISH_STRING, CFISH_ALLOCA_OBJ(CFISH_STRING)); sv = ST(locations[1]); arg_formatter = (cfish_TestFormatter*)XSBind_arg_to_cfish(aTHX_ sv, "formatter", CFISH_TESTFORMATTER, NULL); /* Execute */ method = CFISH_METHOD_PTR(CFISH_TESTSUITE, CFISH_TestSuite_Run_Batch); retval = method(arg_self, arg_class_name, arg_formatter); ST(0) = newSViv(retval); sv_2mortal( ST(0) ); XSRETURN(1); } XS_INTERNAL(XS_Clownfish_TestHarness_TestSuite_run_all_batches); XS_INTERNAL(XS_Clownfish_TestHarness_TestSuite_run_all_batches) { dXSARGS; SV *sv; cfish_TestSuite* arg_self; cfish_TestFormatter* arg_formatter; CFISH_TestSuite_Run_All_Batches_t method; bool retval; CFISH_UNUSED_VAR(cv); SP -= items; if (items != 2) { XSBind_invalid_args_error(aTHX_ cv, "self, formatter"); } /* Extract vars from Perl stack. */ arg_self = (cfish_TestSuite*)XSBind_perl_to_cfish_noinc(aTHX_ ST(0), CFISH_TESTSUITE, NULL); sv = ST(1); arg_formatter = (cfish_TestFormatter*)XSBind_arg_to_cfish(aTHX_ sv, "formatter", CFISH_TESTFORMATTER, NULL); /* Execute */ method = CFISH_METHOD_PTR(CFISH_TESTSUITE, CFISH_TestSuite_Run_All_Batches); retval = method(arg_self, arg_formatter); ST(0) = newSViv(retval); sv_2mortal( ST(0) ); XSRETURN(1); } XS_INTERNAL(XS_Clownfish_TestHarness_TestBatch_run); XS_INTERNAL(XS_Clownfish_TestHarness_TestBatch_run) { dXSARGS; SV *sv; cfish_TestBatch* arg_self; cfish_TestBatchRunner* arg_runner; CFISH_TestBatch_Run_t method; CFISH_UNUSED_VAR(cv); SP -= items; if (items != 2) { XSBind_invalid_args_error(aTHX_ cv, "self, runner"); } /* Extract vars from Perl stack. */ arg_self = (cfish_TestBatch*)XSBind_perl_to_cfish_noinc(aTHX_ ST(0), CFISH_TESTBATCH, NULL); sv = ST(1); arg_runner = (cfish_TestBatchRunner*)XSBind_arg_to_cfish(aTHX_ sv, "runner", CFISH_TESTBATCHRUNNER, NULL); /* Execute */ method = CFISH_METHOD_PTR(CFISH_TESTBATCH, CFISH_TestBatch_Run); method(arg_self, arg_runner); XSRETURN(0); } XS_INTERNAL(XS_Clownfish_TestHarness_TestFormatter_new); XS_INTERNAL(XS_Clownfish_TestHarness_TestFormatter_new) { dXSARGS; cfish_TestFormatter* arg_self; cfish_TestFormatter* retval; CFISH_UNUSED_VAR(cv); if (items != 1) { XSBind_invalid_args_error(aTHX_ cv, "class_name, ..."); } SP -= items; arg_self = (cfish_TestFormatter*)XSBind_new_blank_obj(aTHX_ ST(0)); retval = cfish_TestFormatter_init(arg_self); ST(0) = sv_2mortal(CFISH_OBJ_TO_SV_NOINC(retval)); XSRETURN(1); } XS_INTERNAL(XS_Clownfish_TestHarness_TestFormatter_batch_prologue); XS_INTERNAL(XS_Clownfish_TestHarness_TestFormatter_batch_prologue) { dXSARGS; static const XSBind_ParamSpec param_specs[2] = { XSBIND_PARAM("batch", 1), XSBIND_PARAM("num_planned", 1) }; int32_t locations[2]; SV *sv; cfish_TestFormatter* arg_self; cfish_TestBatch* arg_batch; uint32_t arg_num_planned; CFISH_TestFormatter_Batch_Prologue_t method; CFISH_UNUSED_VAR(cv); if (items < 1) { XSBind_invalid_args_error(aTHX_ cv, "self, ..."); } SP -= items; /* Locate args on Perl stack. */ XSBind_locate_args(aTHX_ &ST(0), 1, items, param_specs, locations, 2); arg_self = (cfish_TestFormatter*)XSBind_perl_to_cfish_noinc(aTHX_ ST(0), CFISH_TESTFORMATTER, NULL); sv = ST(locations[0]); arg_batch = (cfish_TestBatch*)XSBind_arg_to_cfish(aTHX_ sv, "batch", CFISH_TESTBATCH, NULL); sv = ST(locations[1]); if (!XSBind_sv_defined(aTHX_ sv)) { XSBind_undef_arg_error(aTHX_ "num_planned"); } arg_num_planned = (uint32_t)SvUV(sv); /* Execute */ method = CFISH_METHOD_PTR(CFISH_TESTFORMATTER, CFISH_TestFormatter_Batch_Prologue); method(arg_self, arg_batch, arg_num_planned); XSRETURN(0); } XS_INTERNAL(XS_Clownfish_TestHarness_TestFormatter_summary); XS_INTERNAL(XS_Clownfish_TestHarness_TestFormatter_summary) { dXSARGS; SV *sv; cfish_TestFormatter* arg_self; cfish_TestSuiteRunner* arg_runner; CFISH_TestFormatter_Summary_t method; CFISH_UNUSED_VAR(cv); SP -= items; if (items != 2) { XSBind_invalid_args_error(aTHX_ cv, "self, runner"); } /* Extract vars from Perl stack. */ arg_self = (cfish_TestFormatter*)XSBind_perl_to_cfish_noinc(aTHX_ ST(0), CFISH_TESTFORMATTER, NULL); sv = ST(1); arg_runner = (cfish_TestSuiteRunner*)XSBind_arg_to_cfish(aTHX_ sv, "runner", CFISH_TESTSUITERUNNER, NULL); /* Execute */ method = CFISH_METHOD_PTR(CFISH_TESTFORMATTER, CFISH_TestFormatter_Summary); method(arg_self, arg_runner); XSRETURN(0); } XS_INTERNAL(XS_Clownfish_TestHarness_TestFormatterCF_new); XS_INTERNAL(XS_Clownfish_TestHarness_TestFormatterCF_new) { dXSARGS; cfish_TestFormatterCF* arg_self; cfish_TestFormatterCF* retval; CFISH_UNUSED_VAR(cv); if (items != 1) { XSBind_invalid_args_error(aTHX_ cv, "class_name, ..."); } SP -= items; arg_self = (cfish_TestFormatterCF*)XSBind_new_blank_obj(aTHX_ ST(0)); retval = cfish_TestFormatterCF_init(arg_self); ST(0) = sv_2mortal(CFISH_OBJ_TO_SV_NOINC(retval)); XSRETURN(1); } XS_INTERNAL(XS_Clownfish_TestHarness_TestFormatterCF_batch_prologue); XS_INTERNAL(XS_Clownfish_TestHarness_TestFormatterCF_batch_prologue) { dXSARGS; static const XSBind_ParamSpec param_specs[2] = { XSBIND_PARAM("batch", 1), XSBIND_PARAM("num_planned", 1) }; int32_t locations[2]; SV *sv; cfish_TestFormatterCF* arg_self; cfish_TestBatch* arg_batch; uint32_t arg_num_planned; CFISH_TestFormatterCF_Batch_Prologue_t method; CFISH_UNUSED_VAR(cv); if (items < 1) { XSBind_invalid_args_error(aTHX_ cv, "self, ..."); } SP -= items; /* Locate args on Perl stack. */ XSBind_locate_args(aTHX_ &ST(0), 1, items, param_specs, locations, 2); arg_self = (cfish_TestFormatterCF*)XSBind_perl_to_cfish_noinc(aTHX_ ST(0), CFISH_TESTFORMATTERCF, NULL); sv = ST(locations[0]); arg_batch = (cfish_TestBatch*)XSBind_arg_to_cfish(aTHX_ sv, "batch", CFISH_TESTBATCH, NULL); sv = ST(locations[1]); if (!XSBind_sv_defined(aTHX_ sv)) { XSBind_undef_arg_error(aTHX_ "num_planned"); } arg_num_planned = (uint32_t)SvUV(sv); /* Execute */ method = CFISH_METHOD_PTR(CFISH_TESTFORMATTERCF, CFISH_TestFormatterCF_Batch_Prologue); method(arg_self, arg_batch, arg_num_planned); XSRETURN(0); } XS_INTERNAL(XS_Clownfish_TestHarness_TestFormatterCF_summary); XS_INTERNAL(XS_Clownfish_TestHarness_TestFormatterCF_summary) { dXSARGS; SV *sv; cfish_TestFormatterCF* arg_self; cfish_TestSuiteRunner* arg_runner; CFISH_TestFormatterCF_Summary_t method; CFISH_UNUSED_VAR(cv); SP -= items; if (items != 2) { XSBind_invalid_args_error(aTHX_ cv, "self, runner"); } /* Extract vars from Perl stack. */ arg_self = (cfish_TestFormatterCF*)XSBind_perl_to_cfish_noinc(aTHX_ ST(0), CFISH_TESTFORMATTERCF, NULL); sv = ST(1); arg_runner = (cfish_TestSuiteRunner*)XSBind_arg_to_cfish(aTHX_ sv, "runner", CFISH_TESTSUITERUNNER, NULL); /* Execute */ method = CFISH_METHOD_PTR(CFISH_TESTFORMATTERCF, CFISH_TestFormatterCF_Summary); method(arg_self, arg_runner); XSRETURN(0); } XS_INTERNAL(XS_Clownfish_TestHarness_TestFormatterTAP_new); XS_INTERNAL(XS_Clownfish_TestHarness_TestFormatterTAP_new) { dXSARGS; cfish_TestFormatterTAP* arg_self; cfish_TestFormatterTAP* retval; CFISH_UNUSED_VAR(cv); if (items != 1) { XSBind_invalid_args_error(aTHX_ cv, "class_name, ..."); } SP -= items; arg_self = (cfish_TestFormatterTAP*)XSBind_new_blank_obj(aTHX_ ST(0)); retval = cfish_TestFormatterTAP_init(arg_self); ST(0) = sv_2mortal(CFISH_OBJ_TO_SV_NOINC(retval)); XSRETURN(1); } XS_INTERNAL(XS_Clownfish_TestHarness_TestFormatterTAP_batch_prologue); XS_INTERNAL(XS_Clownfish_TestHarness_TestFormatterTAP_batch_prologue) { dXSARGS; static const XSBind_ParamSpec param_specs[2] = { XSBIND_PARAM("batch", 1), XSBIND_PARAM("num_planned", 1) }; int32_t locations[2]; SV *sv; cfish_TestFormatterTAP* arg_self; cfish_TestBatch* arg_batch; uint32_t arg_num_planned; CFISH_TestFormatterTAP_Batch_Prologue_t method; CFISH_UNUSED_VAR(cv); if (items < 1) { XSBind_invalid_args_error(aTHX_ cv, "self, ..."); } SP -= items; /* Locate args on Perl stack. */ XSBind_locate_args(aTHX_ &ST(0), 1, items, param_specs, locations, 2); arg_self = (cfish_TestFormatterTAP*)XSBind_perl_to_cfish_noinc(aTHX_ ST(0), CFISH_TESTFORMATTERTAP, NULL); sv = ST(locations[0]); arg_batch = (cfish_TestBatch*)XSBind_arg_to_cfish(aTHX_ sv, "batch", CFISH_TESTBATCH, NULL); sv = ST(locations[1]); if (!XSBind_sv_defined(aTHX_ sv)) { XSBind_undef_arg_error(aTHX_ "num_planned"); } arg_num_planned = (uint32_t)SvUV(sv); /* Execute */ method = CFISH_METHOD_PTR(CFISH_TESTFORMATTERTAP, CFISH_TestFormatterTAP_Batch_Prologue); method(arg_self, arg_batch, arg_num_planned); XSRETURN(0); } XS_INTERNAL(XS_Clownfish_TestHarness_TestFormatterTAP_summary); XS_INTERNAL(XS_Clownfish_TestHarness_TestFormatterTAP_summary) { dXSARGS; SV *sv; cfish_TestFormatterTAP* arg_self; cfish_TestSuiteRunner* arg_runner; CFISH_TestFormatterTAP_Summary_t method; CFISH_UNUSED_VAR(cv); SP -= items; if (items != 2) { XSBind_invalid_args_error(aTHX_ cv, "self, runner"); } /* Extract vars from Perl stack. */ arg_self = (cfish_TestFormatterTAP*)XSBind_perl_to_cfish_noinc(aTHX_ ST(0), CFISH_TESTFORMATTERTAP, NULL); sv = ST(1); arg_runner = (cfish_TestSuiteRunner*)XSBind_arg_to_cfish(aTHX_ sv, "runner", CFISH_TESTSUITERUNNER, NULL); /* Execute */ method = CFISH_METHOD_PTR(CFISH_TESTFORMATTERTAP, CFISH_TestFormatterTAP_Summary); method(arg_self, arg_runner); XSRETURN(0); } XS_INTERNAL(XS_Clownfish_Float_get_value); XS_INTERNAL(XS_Clownfish_Float_get_value) { dXSARGS; cfish_Float* arg_self; CFISH_Float_Get_Value_t method; double retval; CFISH_UNUSED_VAR(cv); SP -= items; if (items != 1) { XSBind_invalid_args_error(aTHX_ cv, "self"); } /* Extract vars from Perl stack. */ arg_self = (cfish_Float*)XSBind_perl_to_cfish_noinc(aTHX_ ST(0), CFISH_FLOAT, NULL); /* Execute */ method = CFISH_METHOD_PTR(CFISH_FLOAT, CFISH_Float_Get_Value); retval = method(arg_self); ST(0) = newSVnv(retval); sv_2mortal( ST(0) ); XSRETURN(1); } XS_INTERNAL(XS_Clownfish_Float_to_i64); XS_INTERNAL(XS_Clownfish_Float_to_i64) { dXSARGS; cfish_Float* arg_self; CFISH_Float_To_I64_t method; int64_t retval; CFISH_UNUSED_VAR(cv); SP -= items; if (items != 1) { XSBind_invalid_args_error(aTHX_ cv, "self"); } /* Extract vars from Perl stack. */ arg_self = (cfish_Float*)XSBind_perl_to_cfish_noinc(aTHX_ ST(0), CFISH_FLOAT, NULL); /* Execute */ method = CFISH_METHOD_PTR(CFISH_FLOAT, CFISH_Float_To_I64); retval = method(arg_self); ST(0) = sizeof(IV) == 8 ? newSViv((IV)retval) : newSVnv((NV)retval); sv_2mortal( ST(0) ); XSRETURN(1); } XS_INTERNAL(XS_Clownfish_Float_to_string); XS_INTERNAL(XS_Clownfish_Float_to_string) { dXSARGS; cfish_Float* arg_self; CFISH_Float_To_String_t method; cfish_String* retval; CFISH_UNUSED_VAR(cv); SP -= items; if (items != 1) { XSBind_invalid_args_error(aTHX_ cv, "self"); } /* Extract vars from Perl stack. */ arg_self = (cfish_Float*)XSBind_perl_to_cfish_noinc(aTHX_ ST(0), CFISH_FLOAT, NULL); /* Execute */ method = CFISH_METHOD_PTR(CFISH_FLOAT, CFISH_Float_To_String); retval = method(arg_self); ST(0) = XSBind_cfish_to_perl(aTHX_ (cfish_Obj*)retval); CFISH_DECREF(retval); sv_2mortal( ST(0) ); XSRETURN(1); } XS_INTERNAL(XS_Clownfish_Float_equals); XS_INTERNAL(XS_Clownfish_Float_equals) { dXSARGS; SV *sv; cfish_Float* arg_self; cfish_Obj* arg_other; CFISH_Float_Equals_t method; bool retval; CFISH_UNUSED_VAR(cv); SP -= items; if (items != 2) { XSBind_invalid_args_error(aTHX_ cv, "self, other"); } /* Extract vars from Perl stack. */ arg_self = (cfish_Float*)XSBind_perl_to_cfish_noinc(aTHX_ ST(0), CFISH_FLOAT, NULL); sv = ST(1); arg_other = (cfish_Obj*)XSBind_arg_to_cfish(aTHX_ sv, "other", CFISH_OBJ, CFISH_ALLOCA_OBJ(CFISH_STRING)); /* Execute */ method = CFISH_METHOD_PTR(CFISH_FLOAT, CFISH_Float_Equals); retval = method(arg_self, arg_other); ST(0) = newSViv(retval); sv_2mortal( ST(0) ); XSRETURN(1); } XS_INTERNAL(XS_Clownfish_Float_compare_to); XS_INTERNAL(XS_Clownfish_Float_compare_to) { dXSARGS; SV *sv; cfish_Float* arg_self; cfish_Obj* arg_other; CFISH_Float_Compare_To_t method; int32_t retval; CFISH_UNUSED_VAR(cv); SP -= items; if (items != 2) { XSBind_invalid_args_error(aTHX_ cv, "self, other"); } /* Extract vars from Perl stack. */ arg_self = (cfish_Float*)XSBind_perl_to_cfish_noinc(aTHX_ ST(0), CFISH_FLOAT, NULL); sv = ST(1); arg_other = (cfish_Obj*)XSBind_arg_to_cfish(aTHX_ sv, "other", CFISH_OBJ, CFISH_ALLOCA_OBJ(CFISH_STRING)); /* Execute */ method = CFISH_METHOD_PTR(CFISH_FLOAT, CFISH_Float_Compare_To); retval = method(arg_self, arg_other); ST(0) = newSViv(retval); sv_2mortal( ST(0) ); XSRETURN(1); } XS_INTERNAL(XS_Clownfish_Float_clone); XS_INTERNAL(XS_Clownfish_Float_clone) { dXSARGS; cfish_Float* arg_self; CFISH_Float_Clone_t method; cfish_Float* retval; CFISH_UNUSED_VAR(cv); SP -= items; if (items != 1) { XSBind_invalid_args_error(aTHX_ cv, "self"); } /* Extract vars from Perl stack. */ arg_self = (cfish_Float*)XSBind_perl_to_cfish_noinc(aTHX_ ST(0), CFISH_FLOAT, NULL); /* Execute */ method = CFISH_METHOD_PTR(CFISH_FLOAT, CFISH_Float_Clone); retval = method(arg_self); ST(0) = XSBind_cfish_to_perl(aTHX_ (cfish_Obj*)retval); CFISH_DECREF(retval); sv_2mortal( ST(0) ); XSRETURN(1); } XS_INTERNAL(XS_Clownfish_Integer_get_value); XS_INTERNAL(XS_Clownfish_Integer_get_value) { dXSARGS; cfish_Integer* arg_self; CFISH_Int_Get_Value_t method; int64_t retval; CFISH_UNUSED_VAR(cv); SP -= items; if (items != 1) { XSBind_invalid_args_error(aTHX_ cv, "self"); } /* Extract vars from Perl stack. */ arg_self = (cfish_Integer*)XSBind_perl_to_cfish_noinc(aTHX_ ST(0), CFISH_INTEGER, NULL); /* Execute */ method = CFISH_METHOD_PTR(CFISH_INTEGER, CFISH_Int_Get_Value); retval = method(arg_self); ST(0) = sizeof(IV) == 8 ? newSViv((IV)retval) : newSVnv((NV)retval); sv_2mortal( ST(0) ); XSRETURN(1); } XS_INTERNAL(XS_Clownfish_Integer_to_f64); XS_INTERNAL(XS_Clownfish_Integer_to_f64) { dXSARGS; cfish_Integer* arg_self; CFISH_Int_To_F64_t method; double retval; CFISH_UNUSED_VAR(cv); SP -= items; if (items != 1) { XSBind_invalid_args_error(aTHX_ cv, "self"); } /* Extract vars from Perl stack. */ arg_self = (cfish_Integer*)XSBind_perl_to_cfish_noinc(aTHX_ ST(0), CFISH_INTEGER, NULL); /* Execute */ method = CFISH_METHOD_PTR(CFISH_INTEGER, CFISH_Int_To_F64); retval = method(arg_self); ST(0) = newSVnv(retval); sv_2mortal( ST(0) ); XSRETURN(1); } XS_INTERNAL(XS_Clownfish_Integer_to_string); XS_INTERNAL(XS_Clownfish_Integer_to_string) { dXSARGS; cfish_Integer* arg_self; CFISH_Int_To_String_t method; cfish_String* retval; CFISH_UNUSED_VAR(cv); SP -= items; if (items != 1) { XSBind_invalid_args_error(aTHX_ cv, "self"); } /* Extract vars from Perl stack. */ arg_self = (cfish_Integer*)XSBind_perl_to_cfish_noinc(aTHX_ ST(0), CFISH_INTEGER, NULL); /* Execute */ method = CFISH_METHOD_PTR(CFISH_INTEGER, CFISH_Int_To_String); retval = method(arg_self); ST(0) = XSBind_cfish_to_perl(aTHX_ (cfish_Obj*)retval); CFISH_DECREF(retval); sv_2mortal( ST(0) ); XSRETURN(1); } XS_INTERNAL(XS_Clownfish_Integer_equals); XS_INTERNAL(XS_Clownfish_Integer_equals) { dXSARGS; SV *sv; cfish_Integer* arg_self; cfish_Obj* arg_other; CFISH_Int_Equals_t method; bool retval; CFISH_UNUSED_VAR(cv); SP -= items; if (items != 2) { XSBind_invalid_args_error(aTHX_ cv, "self, other"); } /* Extract vars from Perl stack. */ arg_self = (cfish_Integer*)XSBind_perl_to_cfish_noinc(aTHX_ ST(0), CFISH_INTEGER, NULL); sv = ST(1); arg_other = (cfish_Obj*)XSBind_arg_to_cfish(aTHX_ sv, "other", CFISH_OBJ, CFISH_ALLOCA_OBJ(CFISH_STRING)); /* Execute */ method = CFISH_METHOD_PTR(CFISH_INTEGER, CFISH_Int_Equals); retval = method(arg_self, arg_other); ST(0) = newSViv(retval); sv_2mortal( ST(0) ); XSRETURN(1); } XS_INTERNAL(XS_Clownfish_Integer_compare_to); XS_INTERNAL(XS_Clownfish_Integer_compare_to) { dXSARGS; SV *sv; cfish_Integer* arg_self; cfish_Obj* arg_other; CFISH_Int_Compare_To_t method; int32_t retval; CFISH_UNUSED_VAR(cv); SP -= items; if (items != 2) { XSBind_invalid_args_error(aTHX_ cv, "self, other"); } /* Extract vars from Perl stack. */ arg_self = (cfish_Integer*)XSBind_perl_to_cfish_noinc(aTHX_ ST(0), CFISH_INTEGER, NULL); sv = ST(1); arg_other = (cfish_Obj*)XSBind_arg_to_cfish(aTHX_ sv, "other", CFISH_OBJ, CFISH_ALLOCA_OBJ(CFISH_STRING)); /* Execute */ method = CFISH_METHOD_PTR(CFISH_INTEGER, CFISH_Int_Compare_To); retval = method(arg_self, arg_other); ST(0) = newSViv(retval); sv_2mortal( ST(0) ); XSRETURN(1); } XS_INTERNAL(XS_Clownfish_Integer_clone); XS_INTERNAL(XS_Clownfish_Integer_clone) { dXSARGS; cfish_Integer* arg_self; CFISH_Int_Clone_t method; cfish_Integer* retval; CFISH_UNUSED_VAR(cv); SP -= items; if (items != 1) { XSBind_invalid_args_error(aTHX_ cv, "self"); } /* Extract vars from Perl stack. */ arg_self = (cfish_Integer*)XSBind_perl_to_cfish_noinc(aTHX_ ST(0), CFISH_INTEGER, NULL); /* Execute */ method = CFISH_METHOD_PTR(CFISH_INTEGER, CFISH_Int_Clone); retval = method(arg_self); ST(0) = XSBind_cfish_to_perl(aTHX_ (cfish_Obj*)retval); CFISH_DECREF(retval); sv_2mortal( ST(0) ); XSRETURN(1); } XS_INTERNAL(XS_Clownfish_Vector_new); XS_INTERNAL(XS_Clownfish_Vector_new) { dXSARGS; static const XSBind_ParamSpec param_specs[1] = { XSBIND_PARAM("capacity", 0) }; int32_t locations[1]; SV *sv; cfish_Vector* arg_self; size_t arg_capacity; cfish_Vector* retval; CFISH_UNUSED_VAR(cv); if (items < 1) { XSBind_invalid_args_error(aTHX_ cv, "class_name, ..."); } SP -= items; XSBind_locate_args(aTHX_ &ST(0), 1, items, param_specs, locations, 1); sv = ST(locations[0]); arg_capacity = locations[0] < items && XSBind_sv_defined(aTHX_ sv) ? (size_t)SvIV(sv) : 0; arg_self = (cfish_Vector*)XSBind_new_blank_obj(aTHX_ ST(0)); retval = cfish_Vec_init(arg_self, arg_capacity); ST(0) = sv_2mortal(CFISH_OBJ_TO_SV_NOINC(retval)); XSRETURN(1); } XS_INTERNAL(XS_Clownfish_Vector_push); XS_INTERNAL(XS_Clownfish_Vector_push) { dXSARGS; SV *sv; cfish_Vector* arg_self; cfish_Obj* arg_element; CFISH_Vec_Push_t method; CFISH_UNUSED_VAR(cv); SP -= items; if (items < 1 || items > 2) { XSBind_invalid_args_error(aTHX_ cv, "self, [element]"); } /* Extract vars from Perl stack. */ arg_self = (cfish_Vector*)XSBind_perl_to_cfish_noinc(aTHX_ ST(0), CFISH_VECTOR, NULL); sv = ST(1); arg_element = 1 < items ? (cfish_Obj*)XSBind_arg_to_cfish_nullable(aTHX_ sv, "element", CFISH_OBJ, CFISH_ALLOCA_OBJ(CFISH_STRING)) : NULL; /* Execute */ method = CFISH_METHOD_PTR(CFISH_VECTOR, CFISH_Vec_Push); arg_element = (cfish_Obj*)CFISH_INCREF(arg_element); method(arg_self, arg_element); XSRETURN(0); } XS_INTERNAL(XS_Clownfish_Vector_push_all); XS_INTERNAL(XS_Clownfish_Vector_push_all) { dXSARGS; SV *sv; cfish_Vector* arg_self; cfish_Vector* arg_other; CFISH_Vec_Push_All_t method; CFISH_UNUSED_VAR(cv); SP -= items; if (items != 2) { XSBind_invalid_args_error(aTHX_ cv, "self, other"); } /* Extract vars from Perl stack. */ arg_self = (cfish_Vector*)XSBind_perl_to_cfish_noinc(aTHX_ ST(0), CFISH_VECTOR, NULL); sv = ST(1); arg_other = (cfish_Vector*)XSBind_arg_to_cfish(aTHX_ sv, "other", CFISH_VECTOR, NULL); /* Execute */ method = CFISH_METHOD_PTR(CFISH_VECTOR, CFISH_Vec_Push_All); method(arg_self, arg_other); XSRETURN(0); } XS_INTERNAL(XS_Clownfish_Vector_pop); XS_INTERNAL(XS_Clownfish_Vector_pop) { dXSARGS; cfish_Vector* arg_self; CFISH_Vec_Pop_t method; cfish_Obj* retval; CFISH_UNUSED_VAR(cv); SP -= items; if (items != 1) { XSBind_invalid_args_error(aTHX_ cv, "self"); } /* Extract vars from Perl stack. */ arg_self = (cfish_Vector*)XSBind_perl_to_cfish_noinc(aTHX_ ST(0), CFISH_VECTOR, NULL); /* Execute */ method = CFISH_METHOD_PTR(CFISH_VECTOR, CFISH_Vec_Pop); retval = method(arg_self); ST(0) = XSBind_cfish_to_perl(aTHX_ (cfish_Obj*)retval); CFISH_DECREF(retval); sv_2mortal( ST(0) ); XSRETURN(1); } XS_INTERNAL(XS_Clownfish_Vector_insert); XS_INTERNAL(XS_Clownfish_Vector_insert) { dXSARGS; static const XSBind_ParamSpec param_specs[2] = { XSBIND_PARAM("tick", 1), XSBIND_PARAM("element", 0) }; int32_t locations[2]; SV *sv; cfish_Vector* arg_self; size_t arg_tick; cfish_Obj* arg_element; CFISH_Vec_Insert_t method; CFISH_UNUSED_VAR(cv); if (items < 1) { XSBind_invalid_args_error(aTHX_ cv, "self, ..."); } SP -= items; /* Locate args on Perl stack. */ XSBind_locate_args(aTHX_ &ST(0), 1, items, param_specs, locations, 2); arg_self = (cfish_Vector*)XSBind_perl_to_cfish_noinc(aTHX_ ST(0), CFISH_VECTOR, NULL); sv = ST(locations[0]); if (!XSBind_sv_defined(aTHX_ sv)) { XSBind_undef_arg_error(aTHX_ "tick"); } arg_tick = (size_t)SvIV(sv); sv = ST(locations[1]); arg_element = locations[1] < items ? (cfish_Obj*)XSBind_arg_to_cfish_nullable(aTHX_ sv, "element", CFISH_OBJ, CFISH_ALLOCA_OBJ(CFISH_STRING)) : NULL; /* Execute */ method = CFISH_METHOD_PTR(CFISH_VECTOR, CFISH_Vec_Insert); arg_element = (cfish_Obj*)CFISH_INCREF(arg_element); method(arg_self, arg_tick, arg_element); XSRETURN(0); } XS_INTERNAL(XS_Clownfish_Vector_insert_all); XS_INTERNAL(XS_Clownfish_Vector_insert_all) { dXSARGS; static const XSBind_ParamSpec param_specs[2] = { XSBIND_PARAM("tick", 1), XSBIND_PARAM("other", 1) }; int32_t locations[2]; SV *sv; cfish_Vector* arg_self; size_t arg_tick; cfish_Vector* arg_other; CFISH_Vec_Insert_All_t method; CFISH_UNUSED_VAR(cv); if (items < 1) { XSBind_invalid_args_error(aTHX_ cv, "self, ..."); } SP -= items; /* Locate args on Perl stack. */ XSBind_locate_args(aTHX_ &ST(0), 1, items, param_specs, locations, 2); arg_self = (cfish_Vector*)XSBind_perl_to_cfish_noinc(aTHX_ ST(0), CFISH_VECTOR, NULL); sv = ST(locations[0]); if (!XSBind_sv_defined(aTHX_ sv)) { XSBind_undef_arg_error(aTHX_ "tick"); } arg_tick = (size_t)SvIV(sv); sv = ST(locations[1]); arg_other = (cfish_Vector*)XSBind_arg_to_cfish(aTHX_ sv, "other", CFISH_VECTOR, NULL); /* Execute */ method = CFISH_METHOD_PTR(CFISH_VECTOR, CFISH_Vec_Insert_All); method(arg_self, arg_tick, arg_other); XSRETURN(0); } XS_INTERNAL(XS_Clownfish_Vector_grow); XS_INTERNAL(XS_Clownfish_Vector_grow) { dXSARGS; SV *sv; cfish_Vector* arg_self; size_t arg_capacity; CFISH_Vec_Grow_t method; CFISH_UNUSED_VAR(cv); SP -= items; if (items != 2) { XSBind_invalid_args_error(aTHX_ cv, "self, capacity"); } /* Extract vars from Perl stack. */ arg_self = (cfish_Vector*)XSBind_perl_to_cfish_noinc(aTHX_ ST(0), CFISH_VECTOR, NULL); sv = ST(1); if (!XSBind_sv_defined(aTHX_ sv)) { XSBind_undef_arg_error(aTHX_ "capacity"); } arg_capacity = (size_t)SvIV(sv); /* Execute */ method = CFISH_METHOD_PTR(CFISH_VECTOR, CFISH_Vec_Grow); method(arg_self, arg_capacity); XSRETURN(0); } XS_INTERNAL(XS_Clownfish_Vector_fetch); XS_INTERNAL(XS_Clownfish_Vector_fetch) { dXSARGS; SV *sv; cfish_Vector* arg_self; size_t arg_tick; CFISH_Vec_Fetch_t method; cfish_Obj* retval; CFISH_UNUSED_VAR(cv); SP -= items; if (items != 2) { XSBind_invalid_args_error(aTHX_ cv, "self, tick"); } /* Extract vars from Perl stack. */ arg_self = (cfish_Vector*)XSBind_perl_to_cfish_noinc(aTHX_ ST(0), CFISH_VECTOR, NULL); sv = ST(1); if (!XSBind_sv_defined(aTHX_ sv)) { XSBind_undef_arg_error(aTHX_ "tick"); } arg_tick = (size_t)SvIV(sv); /* Execute */ method = CFISH_METHOD_PTR(CFISH_VECTOR, CFISH_Vec_Fetch); retval = method(arg_self, arg_tick); ST(0) = XSBind_cfish_to_perl(aTHX_ (cfish_Obj*)retval); sv_2mortal( ST(0) ); XSRETURN(1); } XS_INTERNAL(XS_Clownfish_Vector_delete); XS_INTERNAL(XS_Clownfish_Vector_delete) { dXSARGS; SV *sv; cfish_Vector* arg_self; size_t arg_tick; CFISH_Vec_Delete_t method; cfish_Obj* retval; CFISH_UNUSED_VAR(cv); SP -= items; if (items != 2) { XSBind_invalid_args_error(aTHX_ cv, "self, tick"); } /* Extract vars from Perl stack. */ arg_self = (cfish_Vector*)XSBind_perl_to_cfish_noinc(aTHX_ ST(0), CFISH_VECTOR, NULL); sv = ST(1); if (!XSBind_sv_defined(aTHX_ sv)) { XSBind_undef_arg_error(aTHX_ "tick"); } arg_tick = (size_t)SvIV(sv); /* Execute */ method = CFISH_METHOD_PTR(CFISH_VECTOR, CFISH_Vec_Delete); retval = method(arg_self, arg_tick); ST(0) = XSBind_cfish_to_perl(aTHX_ (cfish_Obj*)retval); CFISH_DECREF(retval); sv_2mortal( ST(0) ); XSRETURN(1); } XS_INTERNAL(XS_Clownfish_Vector_excise); XS_INTERNAL(XS_Clownfish_Vector_excise) { dXSARGS; static const XSBind_ParamSpec param_specs[2] = { XSBIND_PARAM("offset", 1), XSBIND_PARAM("length", 1) }; int32_t locations[2]; SV *sv; cfish_Vector* arg_self; size_t arg_offset; size_t arg_length; CFISH_Vec_Excise_t method; CFISH_UNUSED_VAR(cv); if (items < 1) { XSBind_invalid_args_error(aTHX_ cv, "self, ..."); } SP -= items; /* Locate args on Perl stack. */ XSBind_locate_args(aTHX_ &ST(0), 1, items, param_specs, locations, 2); arg_self = (cfish_Vector*)XSBind_perl_to_cfish_noinc(aTHX_ ST(0), CFISH_VECTOR, NULL); sv = ST(locations[0]); if (!XSBind_sv_defined(aTHX_ sv)) { XSBind_undef_arg_error(aTHX_ "offset"); } arg_offset = (size_t)SvIV(sv); sv = ST(locations[1]); if (!XSBind_sv_defined(aTHX_ sv)) { XSBind_undef_arg_error(aTHX_ "length"); } arg_length = (size_t)SvIV(sv); /* Execute */ method = CFISH_METHOD_PTR(CFISH_VECTOR, CFISH_Vec_Excise); method(arg_self, arg_offset, arg_length); XSRETURN(0); } XS_INTERNAL(XS_Clownfish_Vector_clone); XS_INTERNAL(XS_Clownfish_Vector_clone) { dXSARGS; cfish_Vector* arg_self; CFISH_Vec_Clone_t method; cfish_Vector* retval; CFISH_UNUSED_VAR(cv); SP -= items; if (items != 1) { XSBind_invalid_args_error(aTHX_ cv, "self"); } /* Extract vars from Perl stack. */ arg_self = (cfish_Vector*)XSBind_perl_to_cfish_noinc(aTHX_ ST(0), CFISH_VECTOR, NULL); /* Execute */ method = CFISH_METHOD_PTR(CFISH_VECTOR, CFISH_Vec_Clone); retval = method(arg_self); ST(0) = XSBind_cfish_to_perl(aTHX_ (cfish_Obj*)retval); CFISH_DECREF(retval); sv_2mortal( ST(0) ); XSRETURN(1); } XS_INTERNAL(XS_Clownfish_Vector_sort); XS_INTERNAL(XS_Clownfish_Vector_sort) { dXSARGS; cfish_Vector* arg_self; CFISH_Vec_Sort_t method; CFISH_UNUSED_VAR(cv); SP -= items; if (items != 1) { XSBind_invalid_args_error(aTHX_ cv, "self"); } /* Extract vars from Perl stack. */ arg_self = (cfish_Vector*)XSBind_perl_to_cfish_noinc(aTHX_ ST(0), CFISH_VECTOR, NULL); /* Execute */ method = CFISH_METHOD_PTR(CFISH_VECTOR, CFISH_Vec_Sort); method(arg_self); XSRETURN(0); } XS_INTERNAL(XS_Clownfish_Vector_resize); XS_INTERNAL(XS_Clownfish_Vector_resize) { dXSARGS; SV *sv; cfish_Vector* arg_self; size_t arg_size; CFISH_Vec_Resize_t method; CFISH_UNUSED_VAR(cv); SP -= items; if (items != 2) { XSBind_invalid_args_error(aTHX_ cv, "self, size"); } /* Extract vars from Perl stack. */ arg_self = (cfish_Vector*)XSBind_perl_to_cfish_noinc(aTHX_ ST(0), CFISH_VECTOR, NULL); sv = ST(1); if (!XSBind_sv_defined(aTHX_ sv)) { XSBind_undef_arg_error(aTHX_ "size"); } arg_size = (size_t)SvIV(sv); /* Execute */ method = CFISH_METHOD_PTR(CFISH_VECTOR, CFISH_Vec_Resize); method(arg_self, arg_size); XSRETURN(0); } XS_INTERNAL(XS_Clownfish_Vector_clear); XS_INTERNAL(XS_Clownfish_Vector_clear) { dXSARGS; cfish_Vector* arg_self; CFISH_Vec_Clear_t method; CFISH_UNUSED_VAR(cv); SP -= items; if (items != 1) { XSBind_invalid_args_error(aTHX_ cv, "self"); } /* Extract vars from Perl stack. */ arg_self = (cfish_Vector*)XSBind_perl_to_cfish_noinc(aTHX_ ST(0), CFISH_VECTOR, NULL); /* Execute */ method = CFISH_METHOD_PTR(CFISH_VECTOR, CFISH_Vec_Clear); method(arg_self); XSRETURN(0); } XS_INTERNAL(XS_Clownfish_Vector_get_size); XS_INTERNAL(XS_Clownfish_Vector_get_size) { dXSARGS; cfish_Vector* arg_self; CFISH_Vec_Get_Size_t method; size_t retval; CFISH_UNUSED_VAR(cv); SP -= items; if (items != 1) { XSBind_invalid_args_error(aTHX_ cv, "self"); } /* Extract vars from Perl stack. */ arg_self = (cfish_Vector*)XSBind_perl_to_cfish_noinc(aTHX_ ST(0), CFISH_VECTOR, NULL); /* Execute */ method = CFISH_METHOD_PTR(CFISH_VECTOR, CFISH_Vec_Get_Size); retval = method(arg_self); ST(0) = newSViv(retval); sv_2mortal( ST(0) ); XSRETURN(1); } XS_INTERNAL(XS_Clownfish_Vector_get_capacity); XS_INTERNAL(XS_Clownfish_Vector_get_capacity) { dXSARGS; cfish_Vector* arg_self; CFISH_Vec_Get_Capacity_t method; size_t retval; CFISH_UNUSED_VAR(cv); SP -= items; if (items != 1) { XSBind_invalid_args_error(aTHX_ cv, "self"); } /* Extract vars from Perl stack. */ arg_self = (cfish_Vector*)XSBind_perl_to_cfish_noinc(aTHX_ ST(0), CFISH_VECTOR, NULL); /* Execute */ method = CFISH_METHOD_PTR(CFISH_VECTOR, CFISH_Vec_Get_Capacity); retval = method(arg_self); ST(0) = newSViv(retval); sv_2mortal( ST(0) ); XSRETURN(1); } XS_INTERNAL(XS_Clownfish_Vector_slice); XS_INTERNAL(XS_Clownfish_Vector_slice) { dXSARGS; static const XSBind_ParamSpec param_specs[2] = { XSBIND_PARAM("offset", 1), XSBIND_PARAM("length", 1) }; int32_t locations[2]; SV *sv; cfish_Vector* arg_self; size_t arg_offset; size_t arg_length; CFISH_Vec_Slice_t method; cfish_Vector* retval; CFISH_UNUSED_VAR(cv); if (items < 1) { XSBind_invalid_args_error(aTHX_ cv, "self, ..."); } SP -= items; /* Locate args on Perl stack. */ XSBind_locate_args(aTHX_ &ST(0), 1, items, param_specs, locations, 2); arg_self = (cfish_Vector*)XSBind_perl_to_cfish_noinc(aTHX_ ST(0), CFISH_VECTOR, NULL); sv = ST(locations[0]); if (!XSBind_sv_defined(aTHX_ sv)) { XSBind_undef_arg_error(aTHX_ "offset"); } arg_offset = (size_t)SvIV(sv); sv = ST(locations[1]); if (!XSBind_sv_defined(aTHX_ sv)) { XSBind_undef_arg_error(aTHX_ "length"); } arg_length = (size_t)SvIV(sv); /* Execute */ method = CFISH_METHOD_PTR(CFISH_VECTOR, CFISH_Vec_Slice); retval = method(arg_self, arg_offset, arg_length); ST(0) = XSBind_cfish_to_perl(aTHX_ (cfish_Obj*)retval); CFISH_DECREF(retval); sv_2mortal( ST(0) ); XSRETURN(1); } XS_INTERNAL(XS_Clownfish_Vector_equals); XS_INTERNAL(XS_Clownfish_Vector_equals) { dXSARGS; SV *sv; cfish_Vector* arg_self; cfish_Obj* arg_other; CFISH_Vec_Equals_t method; bool retval; CFISH_UNUSED_VAR(cv); SP -= items; if (items != 2) { XSBind_invalid_args_error(aTHX_ cv, "self, other"); } /* Extract vars from Perl stack. */ arg_self = (cfish_Vector*)XSBind_perl_to_cfish_noinc(aTHX_ ST(0), CFISH_VECTOR, NULL); sv = ST(1); arg_other = (cfish_Obj*)XSBind_arg_to_cfish(aTHX_ sv, "other", CFISH_OBJ, CFISH_ALLOCA_OBJ(CFISH_STRING)); /* Execute */ method = CFISH_METHOD_PTR(CFISH_VECTOR, CFISH_Vec_Equals); retval = method(arg_self, arg_other); ST(0) = newSViv(retval); sv_2mortal( ST(0) ); XSRETURN(1); } XS_INTERNAL(XS_Clownfish_Vector_DESTROY); XS_INTERNAL(XS_Clownfish_Vector_DESTROY) { dXSARGS; cfish_Vector* arg_self; CFISH_Vec_Destroy_t method; CFISH_UNUSED_VAR(cv); SP -= items; if (items != 1) { XSBind_invalid_args_error(aTHX_ cv, "self"); } /* Extract vars from Perl stack. */ arg_self = (cfish_Vector*)XSBind_perl_to_cfish_noinc(aTHX_ ST(0), CFISH_VECTOR, NULL); /* Execute */ method = CFISH_METHOD_PTR(CFISH_VECTOR, CFISH_Vec_Destroy); method(arg_self); XSRETURN(0); } XS_INTERNAL(XS_Clownfish_Hash_new); XS_INTERNAL(XS_Clownfish_Hash_new) { dXSARGS; static const XSBind_ParamSpec param_specs[1] = { XSBIND_PARAM("capacity", 0) }; int32_t locations[1]; SV *sv; cfish_Hash* arg_self; size_t arg_capacity; cfish_Hash* retval; CFISH_UNUSED_VAR(cv); if (items < 1) { XSBind_invalid_args_error(aTHX_ cv, "class_name, ..."); } SP -= items; XSBind_locate_args(aTHX_ &ST(0), 1, items, param_specs, locations, 1); sv = ST(locations[0]); arg_capacity = locations[0] < items && XSBind_sv_defined(aTHX_ sv) ? (size_t)SvIV(sv) : 0; arg_self = (cfish_Hash*)XSBind_new_blank_obj(aTHX_ ST(0)); retval = cfish_Hash_init(arg_self, arg_capacity); ST(0) = sv_2mortal(CFISH_OBJ_TO_SV_NOINC(retval)); XSRETURN(1); } XS_INTERNAL(XS_Clownfish_Hash_clear); XS_INTERNAL(XS_Clownfish_Hash_clear) { dXSARGS; cfish_Hash* arg_self; CFISH_Hash_Clear_t method; CFISH_UNUSED_VAR(cv); SP -= items; if (items != 1) { XSBind_invalid_args_error(aTHX_ cv, "self"); } /* Extract vars from Perl stack. */ arg_self = (cfish_Hash*)XSBind_perl_to_cfish_noinc(aTHX_ ST(0), CFISH_HASH, NULL); /* Execute */ method = CFISH_METHOD_PTR(CFISH_HASH, CFISH_Hash_Clear); method(arg_self); XSRETURN(0); } XS_INTERNAL(XS_Clownfish_Hash_fetch); XS_INTERNAL(XS_Clownfish_Hash_fetch) { dXSARGS; SV *sv; cfish_Hash* arg_self; cfish_String* arg_key; CFISH_Hash_Fetch_t method; cfish_Obj* retval; CFISH_UNUSED_VAR(cv); SP -= items; if (items != 2) { XSBind_invalid_args_error(aTHX_ cv, "self, key"); } /* Extract vars from Perl stack. */ arg_self = (cfish_Hash*)XSBind_perl_to_cfish_noinc(aTHX_ ST(0), CFISH_HASH, NULL); sv = ST(1); arg_key = (cfish_String*)XSBind_arg_to_cfish(aTHX_ sv, "key", CFISH_STRING, CFISH_ALLOCA_OBJ(CFISH_STRING)); /* Execute */ method = CFISH_METHOD_PTR(CFISH_HASH, CFISH_Hash_Fetch); retval = method(arg_self, arg_key); ST(0) = XSBind_cfish_to_perl(aTHX_ (cfish_Obj*)retval); sv_2mortal( ST(0) ); XSRETURN(1); } XS_INTERNAL(XS_Clownfish_Hash_delete); XS_INTERNAL(XS_Clownfish_Hash_delete) { dXSARGS; SV *sv; cfish_Hash* arg_self; cfish_String* arg_key; CFISH_Hash_Delete_t method; cfish_Obj* retval; CFISH_UNUSED_VAR(cv); SP -= items; if (items != 2) { XSBind_invalid_args_error(aTHX_ cv, "self, key"); } /* Extract vars from Perl stack. */ arg_self = (cfish_Hash*)XSBind_perl_to_cfish_noinc(aTHX_ ST(0), CFISH_HASH, NULL); sv = ST(1); arg_key = (cfish_String*)XSBind_arg_to_cfish(aTHX_ sv, "key", CFISH_STRING, CFISH_ALLOCA_OBJ(CFISH_STRING)); /* Execute */ method = CFISH_METHOD_PTR(CFISH_HASH, CFISH_Hash_Delete); retval = method(arg_self, arg_key); ST(0) = XSBind_cfish_to_perl(aTHX_ (cfish_Obj*)retval); CFISH_DECREF(retval); sv_2mortal( ST(0) ); XSRETURN(1); } XS_INTERNAL(XS_Clownfish_Hash_has_key); XS_INTERNAL(XS_Clownfish_Hash_has_key) { dXSARGS; SV *sv; cfish_Hash* arg_self; cfish_String* arg_key; CFISH_Hash_Has_Key_t method; bool retval; CFISH_UNUSED_VAR(cv); SP -= items; if (items != 2) { XSBind_invalid_args_error(aTHX_ cv, "self, key"); } /* Extract vars from Perl stack. */ arg_self = (cfish_Hash*)XSBind_perl_to_cfish_noinc(aTHX_ ST(0), CFISH_HASH, NULL); sv = ST(1); arg_key = (cfish_String*)XSBind_arg_to_cfish(aTHX_ sv, "key", CFISH_STRING, CFISH_ALLOCA_OBJ(CFISH_STRING)); /* Execute */ method = CFISH_METHOD_PTR(CFISH_HASH, CFISH_Hash_Has_Key); retval = method(arg_self, arg_key); ST(0) = newSViv(retval); sv_2mortal( ST(0) ); XSRETURN(1); } XS_INTERNAL(XS_Clownfish_Hash_keys); XS_INTERNAL(XS_Clownfish_Hash_keys) { dXSARGS; cfish_Hash* arg_self; CFISH_Hash_Keys_t method; cfish_Vector* retval; CFISH_UNUSED_VAR(cv); SP -= items; if (items != 1) { XSBind_invalid_args_error(aTHX_ cv, "self"); } /* Extract vars from Perl stack. */ arg_self = (cfish_Hash*)XSBind_perl_to_cfish_noinc(aTHX_ ST(0), CFISH_HASH, NULL); /* Execute */ method = CFISH_METHOD_PTR(CFISH_HASH, CFISH_Hash_Keys); retval = method(arg_self); ST(0) = XSBind_cfish_to_perl(aTHX_ (cfish_Obj*)retval); CFISH_DECREF(retval); sv_2mortal( ST(0) ); XSRETURN(1); } XS_INTERNAL(XS_Clownfish_Hash_values); XS_INTERNAL(XS_Clownfish_Hash_values) { dXSARGS; cfish_Hash* arg_self; CFISH_Hash_Values_t method; cfish_Vector* retval; CFISH_UNUSED_VAR(cv); SP -= items; if (items != 1) { XSBind_invalid_args_error(aTHX_ cv, "self"); } /* Extract vars from Perl stack. */ arg_self = (cfish_Hash*)XSBind_perl_to_cfish_noinc(aTHX_ ST(0), CFISH_HASH, NULL); /* Execute */ method = CFISH_METHOD_PTR(CFISH_HASH, CFISH_Hash_Values); retval = method(arg_self); ST(0) = XSBind_cfish_to_perl(aTHX_ (cfish_Obj*)retval); CFISH_DECREF(retval); sv_2mortal( ST(0) ); XSRETURN(1); } XS_INTERNAL(XS_Clownfish_Hash_get_capacity); XS_INTERNAL(XS_Clownfish_Hash_get_capacity) { dXSARGS; cfish_Hash* arg_self; CFISH_Hash_Get_Capacity_t method; size_t retval; CFISH_UNUSED_VAR(cv); SP -= items; if (items != 1) { XSBind_invalid_args_error(aTHX_ cv, "self"); } /* Extract vars from Perl stack. */ arg_self = (cfish_Hash*)XSBind_perl_to_cfish_noinc(aTHX_ ST(0), CFISH_HASH, NULL); /* Execute */ method = CFISH_METHOD_PTR(CFISH_HASH, CFISH_Hash_Get_Capacity); retval = method(arg_self); ST(0) = newSViv(retval); sv_2mortal( ST(0) ); XSRETURN(1); } XS_INTERNAL(XS_Clownfish_Hash_get_size); XS_INTERNAL(XS_Clownfish_Hash_get_size) { dXSARGS; cfish_Hash* arg_self; CFISH_Hash_Get_Size_t method; size_t retval; CFISH_UNUSED_VAR(cv); SP -= items; if (items != 1) { XSBind_invalid_args_error(aTHX_ cv, "self"); } /* Extract vars from Perl stack. */ arg_self = (cfish_Hash*)XSBind_perl_to_cfish_noinc(aTHX_ ST(0), CFISH_HASH, NULL); /* Execute */ method = CFISH_METHOD_PTR(CFISH_HASH, CFISH_Hash_Get_Size); retval = method(arg_self); ST(0) = newSViv(retval); sv_2mortal( ST(0) ); XSRETURN(1); } XS_INTERNAL(XS_Clownfish_Hash_equals); XS_INTERNAL(XS_Clownfish_Hash_equals) { dXSARGS; SV *sv; cfish_Hash* arg_self; cfish_Obj* arg_other; CFISH_Hash_Equals_t method; bool retval; CFISH_UNUSED_VAR(cv); SP -= items; if (items != 2) { XSBind_invalid_args_error(aTHX_ cv, "self, other"); } /* Extract vars from Perl stack. */ arg_self = (cfish_Hash*)XSBind_perl_to_cfish_noinc(aTHX_ ST(0), CFISH_HASH, NULL); sv = ST(1); arg_other = (cfish_Obj*)XSBind_arg_to_cfish(aTHX_ sv, "other", CFISH_OBJ, CFISH_ALLOCA_OBJ(CFISH_STRING)); /* Execute */ method = CFISH_METHOD_PTR(CFISH_HASH, CFISH_Hash_Equals); retval = method(arg_self, arg_other); ST(0) = newSViv(retval); sv_2mortal( ST(0) ); XSRETURN(1); } XS_INTERNAL(XS_Clownfish_Hash_DESTROY); XS_INTERNAL(XS_Clownfish_Hash_DESTROY) { dXSARGS; cfish_Hash* arg_self; CFISH_Hash_Destroy_t method; CFISH_UNUSED_VAR(cv); SP -= items; if (items != 1) { XSBind_invalid_args_error(aTHX_ cv, "self"); } /* Extract vars from Perl stack. */ arg_self = (cfish_Hash*)XSBind_perl_to_cfish_noinc(aTHX_ ST(0), CFISH_HASH, NULL); /* Execute */ method = CFISH_METHOD_PTR(CFISH_HASH, CFISH_Hash_Destroy); method(arg_self); XSRETURN(0); } XS_INTERNAL(XS_Clownfish_Class_make_obj); XS_INTERNAL(XS_Clownfish_Class_make_obj) { dXSARGS; cfish_Class* arg_self; CFISH_Class_Make_Obj_t method; cfish_Obj* retval; CFISH_UNUSED_VAR(cv); SP -= items; if (items != 1) { XSBind_invalid_args_error(aTHX_ cv, "self"); } /* Extract vars from Perl stack. */ arg_self = (cfish_Class*)XSBind_perl_to_cfish_noinc(aTHX_ ST(0), CFISH_CLASS, NULL); /* Execute */ method = CFISH_METHOD_PTR(CFISH_CLASS, CFISH_Class_Make_Obj); retval = method(arg_self); ST(0) = XSBind_cfish_to_perl(aTHX_ (cfish_Obj*)retval); CFISH_DECREF(retval); sv_2mortal( ST(0) ); XSRETURN(1); } XS_INTERNAL(XS_Clownfish_Class_get_name); XS_INTERNAL(XS_Clownfish_Class_get_name) { dXSARGS; cfish_Class* arg_self; CFISH_Class_Get_Name_t method; cfish_String* retval; CFISH_UNUSED_VAR(cv); SP -= items; if (items != 1) { XSBind_invalid_args_error(aTHX_ cv, "self"); } /* Extract vars from Perl stack. */ arg_self = (cfish_Class*)XSBind_perl_to_cfish_noinc(aTHX_ ST(0), CFISH_CLASS, NULL); /* Execute */ method = CFISH_METHOD_PTR(CFISH_CLASS, CFISH_Class_Get_Name); retval = method(arg_self); ST(0) = XSBind_cfish_to_perl(aTHX_ (cfish_Obj*)retval); sv_2mortal( ST(0) ); XSRETURN(1); } XS_INTERNAL(XS_Clownfish_Class_get_parent); XS_INTERNAL(XS_Clownfish_Class_get_parent) { dXSARGS; cfish_Class* arg_self; CFISH_Class_Get_Parent_t method; cfish_Class* retval; CFISH_UNUSED_VAR(cv); SP -= items; if (items != 1) { XSBind_invalid_args_error(aTHX_ cv, "self"); } /* Extract vars from Perl stack. */ arg_self = (cfish_Class*)XSBind_perl_to_cfish_noinc(aTHX_ ST(0), CFISH_CLASS, NULL); /* Execute */ method = CFISH_METHOD_PTR(CFISH_CLASS, CFISH_Class_Get_Parent); retval = method(arg_self); ST(0) = XSBind_cfish_to_perl(aTHX_ (cfish_Obj*)retval); sv_2mortal( ST(0) ); XSRETURN(1); } XS_INTERNAL(XS_Clownfish_Class_get_obj_alloc_size); XS_INTERNAL(XS_Clownfish_Class_get_obj_alloc_size) { dXSARGS; cfish_Class* arg_self; CFISH_Class_Get_Obj_Alloc_Size_t method; uint32_t retval; CFISH_UNUSED_VAR(cv); SP -= items; if (items != 1) { XSBind_invalid_args_error(aTHX_ cv, "self"); } /* Extract vars from Perl stack. */ arg_self = (cfish_Class*)XSBind_perl_to_cfish_noinc(aTHX_ ST(0), CFISH_CLASS, NULL); /* Execute */ method = CFISH_METHOD_PTR(CFISH_CLASS, CFISH_Class_Get_Obj_Alloc_Size); retval = method(arg_self); ST(0) = newSVuv(retval); sv_2mortal( ST(0) ); XSRETURN(1); } XS_INTERNAL(XS_Clownfish_Class_get_methods); XS_INTERNAL(XS_Clownfish_Class_get_methods) { dXSARGS; cfish_Class* arg_self; CFISH_Class_Get_Methods_t method; cfish_Vector* retval; CFISH_UNUSED_VAR(cv); SP -= items; if (items != 1) { XSBind_invalid_args_error(aTHX_ cv, "self"); } /* Extract vars from Perl stack. */ arg_self = (cfish_Class*)XSBind_perl_to_cfish_noinc(aTHX_ ST(0), CFISH_CLASS, NULL); /* Execute */ method = CFISH_METHOD_PTR(CFISH_CLASS, CFISH_Class_Get_Methods); retval = method(arg_self); ST(0) = XSBind_cfish_to_perl(aTHX_ (cfish_Obj*)retval); CFISH_DECREF(retval); sv_2mortal( ST(0) ); XSRETURN(1); } XS_INTERNAL(XS_Clownfish_Class_DESTROY); XS_INTERNAL(XS_Clownfish_Class_DESTROY) { dXSARGS; cfish_Class* arg_self; CFISH_Class_Destroy_t method; CFISH_UNUSED_VAR(cv); SP -= items; if (items != 1) { XSBind_invalid_args_error(aTHX_ cv, "self"); } /* Extract vars from Perl stack. */ arg_self = (cfish_Class*)XSBind_perl_to_cfish_noinc(aTHX_ ST(0), CFISH_CLASS, NULL); /* Execute */ method = CFISH_METHOD_PTR(CFISH_CLASS, CFISH_Class_Destroy); method(arg_self); XSRETURN(0); } XS_INTERNAL(XS_Clownfish_ByteBuf_set_size); XS_INTERNAL(XS_Clownfish_ByteBuf_set_size) { dXSARGS; SV *sv; cfish_ByteBuf* arg_self; size_t arg_size; CFISH_BB_Set_Size_t method; CFISH_UNUSED_VAR(cv); SP -= items; if (items != 2) { XSBind_invalid_args_error(aTHX_ cv, "self, size"); } /* Extract vars from Perl stack. */ arg_self = (cfish_ByteBuf*)XSBind_perl_to_cfish_noinc(aTHX_ ST(0), CFISH_BYTEBUF, NULL); sv = ST(1); if (!XSBind_sv_defined(aTHX_ sv)) { XSBind_undef_arg_error(aTHX_ "size"); } arg_size = (size_t)SvIV(sv); /* Execute */ method = CFISH_METHOD_PTR(CFISH_BYTEBUF, CFISH_BB_Set_Size); method(arg_self, arg_size); XSRETURN(0); } XS_INTERNAL(XS_Clownfish_ByteBuf_get_size); XS_INTERNAL(XS_Clownfish_ByteBuf_get_size) { dXSARGS; cfish_ByteBuf* arg_self; CFISH_BB_Get_Size_t method; size_t retval; CFISH_UNUSED_VAR(cv); SP -= items; if (items != 1) { XSBind_invalid_args_error(aTHX_ cv, "self"); } /* Extract vars from Perl stack. */ arg_self = (cfish_ByteBuf*)XSBind_perl_to_cfish_noinc(aTHX_ ST(0), CFISH_BYTEBUF, NULL); /* Execute */ method = CFISH_METHOD_PTR(CFISH_BYTEBUF, CFISH_BB_Get_Size); retval = method(arg_self); ST(0) = newSViv(retval); sv_2mortal( ST(0) ); XSRETURN(1); } XS_INTERNAL(XS_Clownfish_ByteBuf_get_capacity); XS_INTERNAL(XS_Clownfish_ByteBuf_get_capacity) { dXSARGS; cfish_ByteBuf* arg_self; CFISH_BB_Get_Capacity_t method; size_t retval; CFISH_UNUSED_VAR(cv); SP -= items; if (items != 1) { XSBind_invalid_args_error(aTHX_ cv, "self"); } /* Extract vars from Perl stack. */ arg_self = (cfish_ByteBuf*)XSBind_perl_to_cfish_noinc(aTHX_ ST(0), CFISH_BYTEBUF, NULL); /* Execute */ method = CFISH_METHOD_PTR(CFISH_BYTEBUF, CFISH_BB_Get_Capacity); retval = method(arg_self); ST(0) = newSViv(retval); sv_2mortal( ST(0) ); XSRETURN(1); } XS_INTERNAL(XS_Clownfish_ByteBuf_cat); XS_INTERNAL(XS_Clownfish_ByteBuf_cat) { dXSARGS; SV *sv; cfish_ByteBuf* arg_self; cfish_Blob* arg_blob; CFISH_BB_Cat_t method; CFISH_UNUSED_VAR(cv); SP -= items; if (items != 2) { XSBind_invalid_args_error(aTHX_ cv, "self, blob"); } /* Extract vars from Perl stack. */ arg_self = (cfish_ByteBuf*)XSBind_perl_to_cfish_noinc(aTHX_ ST(0), CFISH_BYTEBUF, NULL); sv = ST(1); arg_blob = (cfish_Blob*)XSBind_arg_to_cfish(aTHX_ sv, "blob", CFISH_BLOB, NULL); /* Execute */ method = CFISH_METHOD_PTR(CFISH_BYTEBUF, CFISH_BB_Cat); method(arg_self, arg_blob); XSRETURN(0); } XS_INTERNAL(XS_Clownfish_ByteBuf_yield_blob); XS_INTERNAL(XS_Clownfish_ByteBuf_yield_blob) { dXSARGS; cfish_ByteBuf* arg_self; CFISH_BB_Yield_Blob_t method; cfish_Blob* retval; CFISH_UNUSED_VAR(cv); SP -= items; if (items != 1) { XSBind_invalid_args_error(aTHX_ cv, "self"); } /* Extract vars from Perl stack. */ arg_self = (cfish_ByteBuf*)XSBind_perl_to_cfish_noinc(aTHX_ ST(0), CFISH_BYTEBUF, NULL); /* Execute */ method = CFISH_METHOD_PTR(CFISH_BYTEBUF, CFISH_BB_Yield_Blob); retval = method(arg_self); ST(0) = XSBind_cfish_to_perl(aTHX_ (cfish_Obj*)retval); CFISH_DECREF(retval); sv_2mortal( ST(0) ); XSRETURN(1); } XS_INTERNAL(XS_Clownfish_ByteBuf_utf8_to_string); XS_INTERNAL(XS_Clownfish_ByteBuf_utf8_to_string) { dXSARGS; cfish_ByteBuf* arg_self; CFISH_BB_Utf8_To_String_t method; cfish_String* retval; CFISH_UNUSED_VAR(cv); SP -= items; if (items != 1) { XSBind_invalid_args_error(aTHX_ cv, "self"); } /* Extract vars from Perl stack. */ arg_self = (cfish_ByteBuf*)XSBind_perl_to_cfish_noinc(aTHX_ ST(0), CFISH_BYTEBUF, NULL); /* Execute */ method = CFISH_METHOD_PTR(CFISH_BYTEBUF, CFISH_BB_Utf8_To_String); retval = method(arg_self); ST(0) = XSBind_cfish_to_perl(aTHX_ (cfish_Obj*)retval); CFISH_DECREF(retval); sv_2mortal( ST(0) ); XSRETURN(1); } XS_INTERNAL(XS_Clownfish_ByteBuf_trusted_utf8_to_string); XS_INTERNAL(XS_Clownfish_ByteBuf_trusted_utf8_to_string) { dXSARGS; cfish_ByteBuf* arg_self; CFISH_BB_Trusted_Utf8_To_String_t method; cfish_String* retval; CFISH_UNUSED_VAR(cv); SP -= items; if (items != 1) { XSBind_invalid_args_error(aTHX_ cv, "self"); } /* Extract vars from Perl stack. */ arg_self = (cfish_ByteBuf*)XSBind_perl_to_cfish_noinc(aTHX_ ST(0), CFISH_BYTEBUF, NULL); /* Execute */ method = CFISH_METHOD_PTR(CFISH_BYTEBUF, CFISH_BB_Trusted_Utf8_To_String); retval = method(arg_self); ST(0) = XSBind_cfish_to_perl(aTHX_ (cfish_Obj*)retval); CFISH_DECREF(retval); sv_2mortal( ST(0) ); XSRETURN(1); } XS_INTERNAL(XS_Clownfish_ByteBuf_equals); XS_INTERNAL(XS_Clownfish_ByteBuf_equals) { dXSARGS; SV *sv; cfish_ByteBuf* arg_self; cfish_Obj* arg_other; CFISH_BB_Equals_t method; bool retval; CFISH_UNUSED_VAR(cv); SP -= items; if (items != 2) { XSBind_invalid_args_error(aTHX_ cv, "self, other"); } /* Extract vars from Perl stack. */ arg_self = (cfish_ByteBuf*)XSBind_perl_to_cfish_noinc(aTHX_ ST(0), CFISH_BYTEBUF, NULL); sv = ST(1); arg_other = (cfish_Obj*)XSBind_arg_to_cfish(aTHX_ sv, "other", CFISH_OBJ, CFISH_ALLOCA_OBJ(CFISH_STRING)); /* Execute */ method = CFISH_METHOD_PTR(CFISH_BYTEBUF, CFISH_BB_Equals); retval = method(arg_self, arg_other); ST(0) = newSViv(retval); sv_2mortal( ST(0) ); XSRETURN(1); } XS_INTERNAL(XS_Clownfish_ByteBuf_compare_to); XS_INTERNAL(XS_Clownfish_ByteBuf_compare_to) { dXSARGS; SV *sv; cfish_ByteBuf* arg_self; cfish_Obj* arg_other; CFISH_BB_Compare_To_t method; int32_t retval; CFISH_UNUSED_VAR(cv); SP -= items; if (items != 2) { XSBind_invalid_args_error(aTHX_ cv, "self, other"); } /* Extract vars from Perl stack. */ arg_self = (cfish_ByteBuf*)XSBind_perl_to_cfish_noinc(aTHX_ ST(0), CFISH_BYTEBUF, NULL); sv = ST(1); arg_other = (cfish_Obj*)XSBind_arg_to_cfish(aTHX_ sv, "other", CFISH_OBJ, CFISH_ALLOCA_OBJ(CFISH_STRING)); /* Execute */ method = CFISH_METHOD_PTR(CFISH_BYTEBUF, CFISH_BB_Compare_To); retval = method(arg_self, arg_other); ST(0) = newSViv(retval); sv_2mortal( ST(0) ); XSRETURN(1); } XS_INTERNAL(XS_Clownfish_ByteBuf_clone); XS_INTERNAL(XS_Clownfish_ByteBuf_clone) { dXSARGS; cfish_ByteBuf* arg_self; CFISH_BB_Clone_t method; cfish_ByteBuf* retval; CFISH_UNUSED_VAR(cv); SP -= items; if (items != 1) { XSBind_invalid_args_error(aTHX_ cv, "self"); } /* Extract vars from Perl stack. */ arg_self = (cfish_ByteBuf*)XSBind_perl_to_cfish_noinc(aTHX_ ST(0), CFISH_BYTEBUF, NULL); /* Execute */ method = CFISH_METHOD_PTR(CFISH_BYTEBUF, CFISH_BB_Clone); retval = method(arg_self); ST(0) = XSBind_cfish_to_perl(aTHX_ (cfish_Obj*)retval); CFISH_DECREF(retval); sv_2mortal( ST(0) ); XSRETURN(1); } XS_INTERNAL(XS_Clownfish_ByteBuf_DESTROY); XS_INTERNAL(XS_Clownfish_ByteBuf_DESTROY) { dXSARGS; cfish_ByteBuf* arg_self; CFISH_BB_Destroy_t method; CFISH_UNUSED_VAR(cv); SP -= items; if (items != 1) { XSBind_invalid_args_error(aTHX_ cv, "self"); } /* Extract vars from Perl stack. */ arg_self = (cfish_ByteBuf*)XSBind_perl_to_cfish_noinc(aTHX_ ST(0), CFISH_BYTEBUF, NULL); /* Execute */ method = CFISH_METHOD_PTR(CFISH_BYTEBUF, CFISH_BB_Destroy); method(arg_self); XSRETURN(0); } XS_INTERNAL(XS_Clownfish_CharBuf_new); XS_INTERNAL(XS_Clownfish_CharBuf_new) { dXSARGS; static const XSBind_ParamSpec param_specs[1] = { XSBIND_PARAM("capacity", 0) }; int32_t locations[1]; SV *sv; cfish_CharBuf* arg_self; size_t arg_capacity; cfish_CharBuf* retval; CFISH_UNUSED_VAR(cv); if (items < 1) { XSBind_invalid_args_error(aTHX_ cv, "class_name, ..."); } SP -= items; XSBind_locate_args(aTHX_ &ST(0), 1, items, param_specs, locations, 1); sv = ST(locations[0]); arg_capacity = locations[0] < items && XSBind_sv_defined(aTHX_ sv) ? (size_t)SvIV(sv) : 0; arg_self = (cfish_CharBuf*)XSBind_new_blank_obj(aTHX_ ST(0)); retval = cfish_CB_init(arg_self, arg_capacity); ST(0) = sv_2mortal(CFISH_OBJ_TO_SV_NOINC(retval)); XSRETURN(1); } XS_INTERNAL(XS_Clownfish_CharBuf_cat); XS_INTERNAL(XS_Clownfish_CharBuf_cat) { dXSARGS; SV *sv; cfish_CharBuf* arg_self; cfish_String* arg_string; CFISH_CB_Cat_t method; CFISH_UNUSED_VAR(cv); SP -= items; if (items != 2) { XSBind_invalid_args_error(aTHX_ cv, "self, string"); } /* Extract vars from Perl stack. */ arg_self = (cfish_CharBuf*)XSBind_perl_to_cfish_noinc(aTHX_ ST(0), CFISH_CHARBUF, NULL); sv = ST(1); arg_string = (cfish_String*)XSBind_arg_to_cfish(aTHX_ sv, "string", CFISH_STRING, CFISH_ALLOCA_OBJ(CFISH_STRING)); /* Execute */ method = CFISH_METHOD_PTR(CFISH_CHARBUF, CFISH_CB_Cat); method(arg_self, arg_string); XSRETURN(0); } XS_INTERNAL(XS_Clownfish_CharBuf_cat_char); XS_INTERNAL(XS_Clownfish_CharBuf_cat_char) { dXSARGS; SV *sv; cfish_CharBuf* arg_self; int32_t arg_code_point; CFISH_CB_Cat_Char_t method; CFISH_UNUSED_VAR(cv); SP -= items; if (items != 2) { XSBind_invalid_args_error(aTHX_ cv, "self, code_point"); } /* Extract vars from Perl stack. */ arg_self = (cfish_CharBuf*)XSBind_perl_to_cfish_noinc(aTHX_ ST(0), CFISH_CHARBUF, NULL); sv = ST(1); if (!XSBind_sv_defined(aTHX_ sv)) { XSBind_undef_arg_error(aTHX_ "code_point"); } arg_code_point = (int32_t)SvIV(sv); /* Execute */ method = CFISH_METHOD_PTR(CFISH_CHARBUF, CFISH_CB_Cat_Char); method(arg_self, arg_code_point); XSRETURN(0); } XS_INTERNAL(XS_Clownfish_CharBuf_grow); XS_INTERNAL(XS_Clownfish_CharBuf_grow) { dXSARGS; SV *sv; cfish_CharBuf* arg_self; size_t arg_capacity; CFISH_CB_Grow_t method; CFISH_UNUSED_VAR(cv); SP -= items; if (items != 2) { XSBind_invalid_args_error(aTHX_ cv, "self, capacity"); } /* Extract vars from Perl stack. */ arg_self = (cfish_CharBuf*)XSBind_perl_to_cfish_noinc(aTHX_ ST(0), CFISH_CHARBUF, NULL); sv = ST(1); if (!XSBind_sv_defined(aTHX_ sv)) { XSBind_undef_arg_error(aTHX_ "capacity"); } arg_capacity = (size_t)SvIV(sv); /* Execute */ method = CFISH_METHOD_PTR(CFISH_CHARBUF, CFISH_CB_Grow); method(arg_self, arg_capacity); XSRETURN(0); } XS_INTERNAL(XS_Clownfish_CharBuf_clear); XS_INTERNAL(XS_Clownfish_CharBuf_clear) { dXSARGS; cfish_CharBuf* arg_self; CFISH_CB_Clear_t method; CFISH_UNUSED_VAR(cv); SP -= items; if (items != 1) { XSBind_invalid_args_error(aTHX_ cv, "self"); } /* Extract vars from Perl stack. */ arg_self = (cfish_CharBuf*)XSBind_perl_to_cfish_noinc(aTHX_ ST(0), CFISH_CHARBUF, NULL); /* Execute */ method = CFISH_METHOD_PTR(CFISH_CHARBUF, CFISH_CB_Clear); method(arg_self); XSRETURN(0); } XS_INTERNAL(XS_Clownfish_CharBuf_get_size); XS_INTERNAL(XS_Clownfish_CharBuf_get_size) { dXSARGS; cfish_CharBuf* arg_self; CFISH_CB_Get_Size_t method; size_t retval; CFISH_UNUSED_VAR(cv); SP -= items; if (items != 1) { XSBind_invalid_args_error(aTHX_ cv, "self"); } /* Extract vars from Perl stack. */ arg_self = (cfish_CharBuf*)XSBind_perl_to_cfish_noinc(aTHX_ ST(0), CFISH_CHARBUF, NULL); /* Execute */ method = CFISH_METHOD_PTR(CFISH_CHARBUF, CFISH_CB_Get_Size); retval = method(arg_self); ST(0) = newSViv(retval); sv_2mortal( ST(0) ); XSRETURN(1); } XS_INTERNAL(XS_Clownfish_CharBuf_clone); XS_INTERNAL(XS_Clownfish_CharBuf_clone) { dXSARGS; cfish_CharBuf* arg_self; CFISH_CB_Clone_t method; cfish_CharBuf* retval; CFISH_UNUSED_VAR(cv); SP -= items; if (items != 1) { XSBind_invalid_args_error(aTHX_ cv, "self"); } /* Extract vars from Perl stack. */ arg_self = (cfish_CharBuf*)XSBind_perl_to_cfish_noinc(aTHX_ ST(0), CFISH_CHARBUF, NULL); /* Execute */ method = CFISH_METHOD_PTR(CFISH_CHARBUF, CFISH_CB_Clone); retval = method(arg_self); ST(0) = XSBind_cfish_to_perl(aTHX_ (cfish_Obj*)retval); CFISH_DECREF(retval); sv_2mortal( ST(0) ); XSRETURN(1); } XS_INTERNAL(XS_Clownfish_CharBuf_to_string); XS_INTERNAL(XS_Clownfish_CharBuf_to_string) { dXSARGS; cfish_CharBuf* arg_self; CFISH_CB_To_String_t method; cfish_String* retval; CFISH_UNUSED_VAR(cv); SP -= items; if (items != 1) { XSBind_invalid_args_error(aTHX_ cv, "self"); } /* Extract vars from Perl stack. */ arg_self = (cfish_CharBuf*)XSBind_perl_to_cfish_noinc(aTHX_ ST(0), CFISH_CHARBUF, NULL); /* Execute */ method = CFISH_METHOD_PTR(CFISH_CHARBUF, CFISH_CB_To_String); retval = method(arg_self); ST(0) = XSBind_cfish_to_perl(aTHX_ (cfish_Obj*)retval); CFISH_DECREF(retval); sv_2mortal( ST(0) ); XSRETURN(1); } XS_INTERNAL(XS_Clownfish_CharBuf_yield_string); XS_INTERNAL(XS_Clownfish_CharBuf_yield_string) { dXSARGS; cfish_CharBuf* arg_self; CFISH_CB_Yield_String_t method; cfish_String* retval; CFISH_UNUSED_VAR(cv); SP -= items; if (items != 1) { XSBind_invalid_args_error(aTHX_ cv, "self"); } /* Extract vars from Perl stack. */ arg_self = (cfish_CharBuf*)XSBind_perl_to_cfish_noinc(aTHX_ ST(0), CFISH_CHARBUF, NULL); /* Execute */ method = CFISH_METHOD_PTR(CFISH_CHARBUF, CFISH_CB_Yield_String); retval = method(arg_self); ST(0) = XSBind_cfish_to_perl(aTHX_ (cfish_Obj*)retval); CFISH_DECREF(retval); sv_2mortal( ST(0) ); XSRETURN(1); } XS_INTERNAL(XS_Clownfish_CharBuf_DESTROY); XS_INTERNAL(XS_Clownfish_CharBuf_DESTROY) { dXSARGS; cfish_CharBuf* arg_self; CFISH_CB_Destroy_t method; CFISH_UNUSED_VAR(cv); SP -= items; if (items != 1) { XSBind_invalid_args_error(aTHX_ cv, "self"); } /* Extract vars from Perl stack. */ arg_self = (cfish_CharBuf*)XSBind_perl_to_cfish_noinc(aTHX_ ST(0), CFISH_CHARBUF, NULL); /* Execute */ method = CFISH_METHOD_PTR(CFISH_CHARBUF, CFISH_CB_Destroy); method(arg_self); XSRETURN(0); } XS_INTERNAL(XS_Clownfish_Boolean_get_value); XS_INTERNAL(XS_Clownfish_Boolean_get_value) { dXSARGS; cfish_Boolean* arg_self; CFISH_Bool_Get_Value_t method; bool retval; CFISH_UNUSED_VAR(cv); SP -= items; if (items != 1) { XSBind_invalid_args_error(aTHX_ cv, "self"); } /* Extract vars from Perl stack. */ arg_self = (cfish_Boolean*)XSBind_perl_to_cfish_noinc(aTHX_ ST(0), CFISH_BOOLEAN, NULL); /* Execute */ method = CFISH_METHOD_PTR(CFISH_BOOLEAN, CFISH_Bool_Get_Value); retval = method(arg_self); ST(0) = newSViv(retval); sv_2mortal( ST(0) ); XSRETURN(1); } XS_INTERNAL(XS_Clownfish_Boolean_clone); XS_INTERNAL(XS_Clownfish_Boolean_clone) { dXSARGS; cfish_Boolean* arg_self; CFISH_Bool_Clone_t method; cfish_Boolean* retval; CFISH_UNUSED_VAR(cv); SP -= items; if (items != 1) { XSBind_invalid_args_error(aTHX_ cv, "self"); } /* Extract vars from Perl stack. */ arg_self = (cfish_Boolean*)XSBind_perl_to_cfish_noinc(aTHX_ ST(0), CFISH_BOOLEAN, NULL); /* Execute */ method = CFISH_METHOD_PTR(CFISH_BOOLEAN, CFISH_Bool_Clone); retval = method(arg_self); ST(0) = XSBind_cfish_to_perl(aTHX_ (cfish_Obj*)retval); CFISH_DECREF(retval); sv_2mortal( ST(0) ); XSRETURN(1); } XS_INTERNAL(XS_Clownfish_Boolean_equals); XS_INTERNAL(XS_Clownfish_Boolean_equals) { dXSARGS; SV *sv; cfish_Boolean* arg_self; cfish_Obj* arg_other; CFISH_Bool_Equals_t method; bool retval; CFISH_UNUSED_VAR(cv); SP -= items; if (items != 2) { XSBind_invalid_args_error(aTHX_ cv, "self, other"); } /* Extract vars from Perl stack. */ arg_self = (cfish_Boolean*)XSBind_perl_to_cfish_noinc(aTHX_ ST(0), CFISH_BOOLEAN, NULL); sv = ST(1); arg_other = (cfish_Obj*)XSBind_arg_to_cfish(aTHX_ sv, "other", CFISH_OBJ, CFISH_ALLOCA_OBJ(CFISH_STRING)); /* Execute */ method = CFISH_METHOD_PTR(CFISH_BOOLEAN, CFISH_Bool_Equals); retval = method(arg_self, arg_other); ST(0) = newSViv(retval); sv_2mortal( ST(0) ); XSRETURN(1); } XS_INTERNAL(XS_Clownfish_Boolean_to_string); XS_INTERNAL(XS_Clownfish_Boolean_to_string) { dXSARGS; cfish_Boolean* arg_self; CFISH_Bool_To_String_t method; cfish_String* retval; CFISH_UNUSED_VAR(cv); SP -= items; if (items != 1) { XSBind_invalid_args_error(aTHX_ cv, "self"); } /* Extract vars from Perl stack. */ arg_self = (cfish_Boolean*)XSBind_perl_to_cfish_noinc(aTHX_ ST(0), CFISH_BOOLEAN, NULL); /* Execute */ method = CFISH_METHOD_PTR(CFISH_BOOLEAN, CFISH_Bool_To_String); retval = method(arg_self); ST(0) = XSBind_cfish_to_perl(aTHX_ (cfish_Obj*)retval); CFISH_DECREF(retval); sv_2mortal( ST(0) ); XSRETURN(1); } XS_INTERNAL(XS_Clownfish_Boolean_DESTROY); XS_INTERNAL(XS_Clownfish_Boolean_DESTROY) { dXSARGS; cfish_Boolean* arg_self; CFISH_Bool_Destroy_t method; CFISH_UNUSED_VAR(cv); SP -= items; if (items != 1) { XSBind_invalid_args_error(aTHX_ cv, "self"); } /* Extract vars from Perl stack. */ arg_self = (cfish_Boolean*)XSBind_perl_to_cfish_noinc(aTHX_ ST(0), CFISH_BOOLEAN, NULL); /* Execute */ method = CFISH_METHOD_PTR(CFISH_BOOLEAN, CFISH_Bool_Destroy); method(arg_self); XSRETURN(0); } XS_INTERNAL(XS_Clownfish_HashIterator_next); XS_INTERNAL(XS_Clownfish_HashIterator_next) { dXSARGS; cfish_HashIterator* arg_self; CFISH_HashIter_Next_t method; bool retval; CFISH_UNUSED_VAR(cv); SP -= items; if (items != 1) { XSBind_invalid_args_error(aTHX_ cv, "self"); } /* Extract vars from Perl stack. */ arg_self = (cfish_HashIterator*)XSBind_perl_to_cfish_noinc(aTHX_ ST(0), CFISH_HASHITERATOR, NULL); /* Execute */ method = CFISH_METHOD_PTR(CFISH_HASHITERATOR, CFISH_HashIter_Next); retval = method(arg_self); ST(0) = newSViv(retval); sv_2mortal( ST(0) ); XSRETURN(1); } XS_INTERNAL(XS_Clownfish_HashIterator_get_key); XS_INTERNAL(XS_Clownfish_HashIterator_get_key) { dXSARGS; cfish_HashIterator* arg_self; CFISH_HashIter_Get_Key_t method; cfish_String* retval; CFISH_UNUSED_VAR(cv); SP -= items; if (items != 1) { XSBind_invalid_args_error(aTHX_ cv, "self"); } /* Extract vars from Perl stack. */ arg_self = (cfish_HashIterator*)XSBind_perl_to_cfish_noinc(aTHX_ ST(0), CFISH_HASHITERATOR, NULL); /* Execute */ method = CFISH_METHOD_PTR(CFISH_HASHITERATOR, CFISH_HashIter_Get_Key); retval = method(arg_self); ST(0) = XSBind_cfish_to_perl(aTHX_ (cfish_Obj*)retval); sv_2mortal( ST(0) ); XSRETURN(1); } XS_INTERNAL(XS_Clownfish_HashIterator_get_value); XS_INTERNAL(XS_Clownfish_HashIterator_get_value) { dXSARGS; cfish_HashIterator* arg_self; CFISH_HashIter_Get_Value_t method; cfish_Obj* retval; CFISH_UNUSED_VAR(cv); SP -= items; if (items != 1) { XSBind_invalid_args_error(aTHX_ cv, "self"); } /* Extract vars from Perl stack. */ arg_self = (cfish_HashIterator*)XSBind_perl_to_cfish_noinc(aTHX_ ST(0), CFISH_HASHITERATOR, NULL); /* Execute */ method = CFISH_METHOD_PTR(CFISH_HASHITERATOR, CFISH_HashIter_Get_Value); retval = method(arg_self); ST(0) = XSBind_cfish_to_perl(aTHX_ (cfish_Obj*)retval); sv_2mortal( ST(0) ); XSRETURN(1); } XS_INTERNAL(XS_Clownfish_HashIterator_DESTROY); XS_INTERNAL(XS_Clownfish_HashIterator_DESTROY) { dXSARGS; cfish_HashIterator* arg_self; CFISH_HashIter_Destroy_t method; CFISH_UNUSED_VAR(cv); SP -= items; if (items != 1) { XSBind_invalid_args_error(aTHX_ cv, "self"); } /* Extract vars from Perl stack. */ arg_self = (cfish_HashIterator*)XSBind_perl_to_cfish_noinc(aTHX_ ST(0), CFISH_HASHITERATOR, NULL); /* Execute */ method = CFISH_METHOD_PTR(CFISH_HASHITERATOR, CFISH_HashIter_Destroy); method(arg_self); XSRETURN(0); } XS_INTERNAL(XS_Clownfish_Method_get_name); XS_INTERNAL(XS_Clownfish_Method_get_name) { dXSARGS; cfish_Method* arg_self; CFISH_Method_Get_Name_t method; cfish_String* retval; CFISH_UNUSED_VAR(cv); SP -= items; if (items != 1) { XSBind_invalid_args_error(aTHX_ cv, "self"); } /* Extract vars from Perl stack. */ arg_self = (cfish_Method*)XSBind_perl_to_cfish_noinc(aTHX_ ST(0), CFISH_METHOD, NULL); /* Execute */ method = CFISH_METHOD_PTR(CFISH_METHOD, CFISH_Method_Get_Name); retval = method(arg_self); ST(0) = XSBind_cfish_to_perl(aTHX_ (cfish_Obj*)retval); sv_2mortal( ST(0) ); XSRETURN(1); } XS_INTERNAL(XS_Clownfish_Method_set_host_alias); XS_INTERNAL(XS_Clownfish_Method_set_host_alias) { dXSARGS; SV *sv; cfish_Method* arg_self; cfish_String* arg_name; CFISH_Method_Set_Host_Alias_t method; CFISH_UNUSED_VAR(cv); SP -= items; if (items != 2) { XSBind_invalid_args_error(aTHX_ cv, "self, name"); } /* Extract vars from Perl stack. */ arg_self = (cfish_Method*)XSBind_perl_to_cfish_noinc(aTHX_ ST(0), CFISH_METHOD, NULL); sv = ST(1); arg_name = (cfish_String*)XSBind_arg_to_cfish(aTHX_ sv, "name", CFISH_STRING, CFISH_ALLOCA_OBJ(CFISH_STRING)); /* Execute */ method = CFISH_METHOD_PTR(CFISH_METHOD, CFISH_Method_Set_Host_Alias); method(arg_self, arg_name); XSRETURN(0); } XS_INTERNAL(XS_Clownfish_Method_get_host_alias); XS_INTERNAL(XS_Clownfish_Method_get_host_alias) { dXSARGS; cfish_Method* arg_self; CFISH_Method_Get_Host_Alias_t method; cfish_String* retval; CFISH_UNUSED_VAR(cv); SP -= items; if (items != 1) { XSBind_invalid_args_error(aTHX_ cv, "self"); } /* Extract vars from Perl stack. */ arg_self = (cfish_Method*)XSBind_perl_to_cfish_noinc(aTHX_ ST(0), CFISH_METHOD, NULL); /* Execute */ method = CFISH_METHOD_PTR(CFISH_METHOD, CFISH_Method_Get_Host_Alias); retval = method(arg_self); ST(0) = XSBind_cfish_to_perl(aTHX_ (cfish_Obj*)retval); sv_2mortal( ST(0) ); XSRETURN(1); } XS_INTERNAL(XS_Clownfish_Method_is_excluded_from_host); XS_INTERNAL(XS_Clownfish_Method_is_excluded_from_host) { dXSARGS; cfish_Method* arg_self; CFISH_Method_Is_Excluded_From_Host_t method; bool retval; CFISH_UNUSED_VAR(cv); SP -= items; if (items != 1) { XSBind_invalid_args_error(aTHX_ cv, "self"); } /* Extract vars from Perl stack. */ arg_self = (cfish_Method*)XSBind_perl_to_cfish_noinc(aTHX_ ST(0), CFISH_METHOD, NULL); /* Execute */ method = CFISH_METHOD_PTR(CFISH_METHOD, CFISH_Method_Is_Excluded_From_Host); retval = method(arg_self); ST(0) = newSViv(retval); sv_2mortal( ST(0) ); XSRETURN(1); } XS_INTERNAL(XS_Clownfish_Method_host_name); XS_INTERNAL(XS_Clownfish_Method_host_name) { dXSARGS; cfish_Method* arg_self; CFISH_Method_Host_Name_t method; cfish_String* retval; CFISH_UNUSED_VAR(cv); SP -= items; if (items != 1) { XSBind_invalid_args_error(aTHX_ cv, "self"); } /* Extract vars from Perl stack. */ arg_self = (cfish_Method*)XSBind_perl_to_cfish_noinc(aTHX_ ST(0), CFISH_METHOD, NULL); /* Execute */ method = CFISH_METHOD_PTR(CFISH_METHOD, CFISH_Method_Host_Name); retval = method(arg_self); ST(0) = XSBind_cfish_to_perl(aTHX_ (cfish_Obj*)retval); CFISH_DECREF(retval); sv_2mortal( ST(0) ); XSRETURN(1); } XS_INTERNAL(XS_Clownfish_Method_DESTROY); XS_INTERNAL(XS_Clownfish_Method_DESTROY) { dXSARGS; cfish_Method* arg_self; CFISH_Method_Destroy_t method; CFISH_UNUSED_VAR(cv); SP -= items; if (items != 1) { XSBind_invalid_args_error(aTHX_ cv, "self"); } /* Extract vars from Perl stack. */ arg_self = (cfish_Method*)XSBind_perl_to_cfish_noinc(aTHX_ ST(0), CFISH_METHOD, NULL); /* Execute */ method = CFISH_METHOD_PTR(CFISH_METHOD, CFISH_Method_Destroy); method(arg_self); XSRETURN(0); } XS_INTERNAL(XS_Clownfish_String_cat); XS_INTERNAL(XS_Clownfish_String_cat) { dXSARGS; SV *sv; cfish_String* arg_self; cfish_String* arg_other; CFISH_Str_Cat_t method; cfish_String* retval; CFISH_UNUSED_VAR(cv); SP -= items; if (items != 2) { XSBind_invalid_args_error(aTHX_ cv, "self, other"); } /* Extract vars from Perl stack. */ arg_self = (cfish_String*)XSBind_perl_to_cfish_noinc(aTHX_ ST(0), CFISH_STRING, NULL); sv = ST(1); arg_other = (cfish_String*)XSBind_arg_to_cfish(aTHX_ sv, "other", CFISH_STRING, CFISH_ALLOCA_OBJ(CFISH_STRING)); /* Execute */ method = CFISH_METHOD_PTR(CFISH_STRING, CFISH_Str_Cat); retval = method(arg_self, arg_other); ST(0) = XSBind_cfish_to_perl(aTHX_ (cfish_Obj*)retval); CFISH_DECREF(retval); sv_2mortal( ST(0) ); XSRETURN(1); } XS_INTERNAL(XS_Clownfish_String_to_i64); XS_INTERNAL(XS_Clownfish_String_to_i64) { dXSARGS; cfish_String* arg_self; CFISH_Str_To_I64_t method; int64_t retval; CFISH_UNUSED_VAR(cv); SP -= items; if (items != 1) { XSBind_invalid_args_error(aTHX_ cv, "self"); } /* Extract vars from Perl stack. */ arg_self = (cfish_String*)XSBind_perl_to_cfish_noinc(aTHX_ ST(0), CFISH_STRING, NULL); /* Execute */ method = CFISH_METHOD_PTR(CFISH_STRING, CFISH_Str_To_I64); retval = method(arg_self); ST(0) = sizeof(IV) == 8 ? newSViv((IV)retval) : newSVnv((NV)retval); sv_2mortal( ST(0) ); XSRETURN(1); } XS_INTERNAL(XS_Clownfish_String_basex_to_i64); XS_INTERNAL(XS_Clownfish_String_basex_to_i64) { dXSARGS; SV *sv; cfish_String* arg_self; uint32_t arg_base; CFISH_Str_BaseX_To_I64_t method; int64_t retval; CFISH_UNUSED_VAR(cv); SP -= items; if (items != 2) { XSBind_invalid_args_error(aTHX_ cv, "self, base"); } /* Extract vars from Perl stack. */ arg_self = (cfish_String*)XSBind_perl_to_cfish_noinc(aTHX_ ST(0), CFISH_STRING, NULL); sv = ST(1); if (!XSBind_sv_defined(aTHX_ sv)) { XSBind_undef_arg_error(aTHX_ "base"); } arg_base = (uint32_t)SvUV(sv); /* Execute */ method = CFISH_METHOD_PTR(CFISH_STRING, CFISH_Str_BaseX_To_I64); retval = method(arg_self, arg_base); ST(0) = sizeof(IV) == 8 ? newSViv((IV)retval) : newSVnv((NV)retval); sv_2mortal( ST(0) ); XSRETURN(1); } XS_INTERNAL(XS_Clownfish_String_to_f64); XS_INTERNAL(XS_Clownfish_String_to_f64) { dXSARGS; cfish_String* arg_self; CFISH_Str_To_F64_t method; double retval; CFISH_UNUSED_VAR(cv); SP -= items; if (items != 1) { XSBind_invalid_args_error(aTHX_ cv, "self"); } /* Extract vars from Perl stack. */ arg_self = (cfish_String*)XSBind_perl_to_cfish_noinc(aTHX_ ST(0), CFISH_STRING, NULL); /* Execute */ method = CFISH_METHOD_PTR(CFISH_STRING, CFISH_Str_To_F64); retval = method(arg_self); ST(0) = newSVnv(retval); sv_2mortal( ST(0) ); XSRETURN(1); } XS_INTERNAL(XS_Clownfish_String_starts_with); XS_INTERNAL(XS_Clownfish_String_starts_with) { dXSARGS; SV *sv; cfish_String* arg_self; cfish_String* arg_prefix; CFISH_Str_Starts_With_t method; bool retval; CFISH_UNUSED_VAR(cv); SP -= items; if (items != 2) { XSBind_invalid_args_error(aTHX_ cv, "self, prefix"); } /* Extract vars from Perl stack. */ arg_self = (cfish_String*)XSBind_perl_to_cfish_noinc(aTHX_ ST(0), CFISH_STRING, NULL); sv = ST(1); arg_prefix = (cfish_String*)XSBind_arg_to_cfish(aTHX_ sv, "prefix", CFISH_STRING, CFISH_ALLOCA_OBJ(CFISH_STRING)); /* Execute */ method = CFISH_METHOD_PTR(CFISH_STRING, CFISH_Str_Starts_With); retval = method(arg_self, arg_prefix); ST(0) = newSViv(retval); sv_2mortal( ST(0) ); XSRETURN(1); } XS_INTERNAL(XS_Clownfish_String_ends_with); XS_INTERNAL(XS_Clownfish_String_ends_with) { dXSARGS; SV *sv; cfish_String* arg_self; cfish_String* arg_suffix; CFISH_Str_Ends_With_t method; bool retval; CFISH_UNUSED_VAR(cv); SP -= items; if (items != 2) { XSBind_invalid_args_error(aTHX_ cv, "self, suffix"); } /* Extract vars from Perl stack. */ arg_self = (cfish_String*)XSBind_perl_to_cfish_noinc(aTHX_ ST(0), CFISH_STRING, NULL); sv = ST(1); arg_suffix = (cfish_String*)XSBind_arg_to_cfish(aTHX_ sv, "suffix", CFISH_STRING, CFISH_ALLOCA_OBJ(CFISH_STRING)); /* Execute */ method = CFISH_METHOD_PTR(CFISH_STRING, CFISH_Str_Ends_With); retval = method(arg_self, arg_suffix); ST(0) = newSViv(retval); sv_2mortal( ST(0) ); XSRETURN(1); } XS_INTERNAL(XS_Clownfish_String_contains); XS_INTERNAL(XS_Clownfish_String_contains) { dXSARGS; SV *sv; cfish_String* arg_self; cfish_String* arg_substring; CFISH_Str_Contains_t method; bool retval; CFISH_UNUSED_VAR(cv); SP -= items; if (items != 2) { XSBind_invalid_args_error(aTHX_ cv, "self, substring"); } /* Extract vars from Perl stack. */ arg_self = (cfish_String*)XSBind_perl_to_cfish_noinc(aTHX_ ST(0), CFISH_STRING, NULL); sv = ST(1); arg_substring = (cfish_String*)XSBind_arg_to_cfish(aTHX_ sv, "substring", CFISH_STRING, CFISH_ALLOCA_OBJ(CFISH_STRING)); /* Execute */ method = CFISH_METHOD_PTR(CFISH_STRING, CFISH_Str_Contains); retval = method(arg_self, arg_substring); ST(0) = newSViv(retval); sv_2mortal( ST(0) ); XSRETURN(1); } XS_INTERNAL(XS_Clownfish_String_find); XS_INTERNAL(XS_Clownfish_String_find) { dXSARGS; SV *sv; cfish_String* arg_self; cfish_String* arg_substring; CFISH_Str_Find_t method; cfish_StringIterator* retval; CFISH_UNUSED_VAR(cv); SP -= items; if (items != 2) { XSBind_invalid_args_error(aTHX_ cv, "self, substring"); } /* Extract vars from Perl stack. */ arg_self = (cfish_String*)XSBind_perl_to_cfish_noinc(aTHX_ ST(0), CFISH_STRING, NULL); sv = ST(1); arg_substring = (cfish_String*)XSBind_arg_to_cfish(aTHX_ sv, "substring", CFISH_STRING, CFISH_ALLOCA_OBJ(CFISH_STRING)); /* Execute */ method = CFISH_METHOD_PTR(CFISH_STRING, CFISH_Str_Find); retval = method(arg_self, arg_substring); ST(0) = XSBind_cfish_to_perl(aTHX_ (cfish_Obj*)retval); CFISH_DECREF(retval); sv_2mortal( ST(0) ); XSRETURN(1); } XS_INTERNAL(XS_Clownfish_String_equals); XS_INTERNAL(XS_Clownfish_String_equals) { dXSARGS; SV *sv; cfish_String* arg_self; cfish_Obj* arg_other; CFISH_Str_Equals_t method; bool retval; CFISH_UNUSED_VAR(cv); SP -= items; if (items != 2) { XSBind_invalid_args_error(aTHX_ cv, "self, other"); } /* Extract vars from Perl stack. */ arg_self = (cfish_String*)XSBind_perl_to_cfish_noinc(aTHX_ ST(0), CFISH_STRING, NULL); sv = ST(1); arg_other = (cfish_Obj*)XSBind_arg_to_cfish(aTHX_ sv, "other", CFISH_OBJ, CFISH_ALLOCA_OBJ(CFISH_STRING)); /* Execute */ method = CFISH_METHOD_PTR(CFISH_STRING, CFISH_Str_Equals); retval = method(arg_self, arg_other); ST(0) = newSViv(retval); sv_2mortal( ST(0) ); XSRETURN(1); } XS_INTERNAL(XS_Clownfish_String_length); XS_INTERNAL(XS_Clownfish_String_length) { dXSARGS; cfish_String* arg_self; CFISH_Str_Length_t method; size_t retval; CFISH_UNUSED_VAR(cv); SP -= items; if (items != 1) { XSBind_invalid_args_error(aTHX_ cv, "self"); } /* Extract vars from Perl stack. */ arg_self = (cfish_String*)XSBind_perl_to_cfish_noinc(aTHX_ ST(0), CFISH_STRING, NULL); /* Execute */ method = CFISH_METHOD_PTR(CFISH_STRING, CFISH_Str_Length); retval = method(arg_self); ST(0) = newSViv(retval); sv_2mortal( ST(0) ); XSRETURN(1); } XS_INTERNAL(XS_Clownfish_String_get_size); XS_INTERNAL(XS_Clownfish_String_get_size) { dXSARGS; cfish_String* arg_self; CFISH_Str_Get_Size_t method; size_t retval; CFISH_UNUSED_VAR(cv); SP -= items; if (items != 1) { XSBind_invalid_args_error(aTHX_ cv, "self"); } /* Extract vars from Perl stack. */ arg_self = (cfish_String*)XSBind_perl_to_cfish_noinc(aTHX_ ST(0), CFISH_STRING, NULL); /* Execute */ method = CFISH_METHOD_PTR(CFISH_STRING, CFISH_Str_Get_Size); retval = method(arg_self); ST(0) = newSViv(retval); sv_2mortal( ST(0) ); XSRETURN(1); } XS_INTERNAL(XS_Clownfish_String_to_bytebuf); XS_INTERNAL(XS_Clownfish_String_to_bytebuf) { dXSARGS; cfish_String* arg_self; CFISH_Str_To_ByteBuf_t method; cfish_ByteBuf* retval; CFISH_UNUSED_VAR(cv); SP -= items; if (items != 1) { XSBind_invalid_args_error(aTHX_ cv, "self"); } /* Extract vars from Perl stack. */ arg_self = (cfish_String*)XSBind_perl_to_cfish_noinc(aTHX_ ST(0), CFISH_STRING, NULL); /* Execute */ method = CFISH_METHOD_PTR(CFISH_STRING, CFISH_Str_To_ByteBuf); retval = method(arg_self); ST(0) = XSBind_cfish_to_perl(aTHX_ (cfish_Obj*)retval); CFISH_DECREF(retval); sv_2mortal( ST(0) ); XSRETURN(1); } XS_INTERNAL(XS_Clownfish_String_clone); XS_INTERNAL(XS_Clownfish_String_clone) { dXSARGS; cfish_String* arg_self; CFISH_Str_Clone_t method; cfish_String* retval; CFISH_UNUSED_VAR(cv); SP -= items; if (items != 1) { XSBind_invalid_args_error(aTHX_ cv, "self"); } /* Extract vars from Perl stack. */ arg_self = (cfish_String*)XSBind_perl_to_cfish_noinc(aTHX_ ST(0), CFISH_STRING, NULL); /* Execute */ method = CFISH_METHOD_PTR(CFISH_STRING, CFISH_Str_Clone); retval = method(arg_self); ST(0) = XSBind_cfish_to_perl(aTHX_ (cfish_Obj*)retval); CFISH_DECREF(retval); sv_2mortal( ST(0) ); XSRETURN(1); } XS_INTERNAL(XS_Clownfish_String_is_copy_on_incref); XS_INTERNAL(XS_Clownfish_String_is_copy_on_incref) { dXSARGS; cfish_String* arg_self; CFISH_Str_Is_Copy_On_IncRef_t method; bool retval; CFISH_UNUSED_VAR(cv); SP -= items; if (items != 1) { XSBind_invalid_args_error(aTHX_ cv, "self"); } /* Extract vars from Perl stack. */ arg_self = (cfish_String*)XSBind_perl_to_cfish_noinc(aTHX_ ST(0), CFISH_STRING, NULL); /* Execute */ method = CFISH_METHOD_PTR(CFISH_STRING, CFISH_Str_Is_Copy_On_IncRef); retval = method(arg_self); ST(0) = newSViv(retval); sv_2mortal( ST(0) ); XSRETURN(1); } XS_INTERNAL(XS_Clownfish_String_compare_to); XS_INTERNAL(XS_Clownfish_String_compare_to) { dXSARGS; SV *sv; cfish_String* arg_self; cfish_Obj* arg_other; CFISH_Str_Compare_To_t method; int32_t retval; CFISH_UNUSED_VAR(cv); SP -= items; if (items != 2) { XSBind_invalid_args_error(aTHX_ cv, "self, other"); } /* Extract vars from Perl stack. */ arg_self = (cfish_String*)XSBind_perl_to_cfish_noinc(aTHX_ ST(0), CFISH_STRING, NULL); sv = ST(1); arg_other = (cfish_Obj*)XSBind_arg_to_cfish(aTHX_ sv, "other", CFISH_OBJ, CFISH_ALLOCA_OBJ(CFISH_STRING)); /* Execute */ method = CFISH_METHOD_PTR(CFISH_STRING, CFISH_Str_Compare_To); retval = method(arg_self, arg_other); ST(0) = newSViv(retval); sv_2mortal( ST(0) ); XSRETURN(1); } XS_INTERNAL(XS_Clownfish_String_hash_sum); XS_INTERNAL(XS_Clownfish_String_hash_sum) { dXSARGS; cfish_String* arg_self; CFISH_Str_Hash_Sum_t method; size_t retval; CFISH_UNUSED_VAR(cv); SP -= items; if (items != 1) { XSBind_invalid_args_error(aTHX_ cv, "self"); } /* Extract vars from Perl stack. */ arg_self = (cfish_String*)XSBind_perl_to_cfish_noinc(aTHX_ ST(0), CFISH_STRING, NULL); /* Execute */ method = CFISH_METHOD_PTR(CFISH_STRING, CFISH_Str_Hash_Sum); retval = method(arg_self); ST(0) = newSViv(retval); sv_2mortal( ST(0) ); XSRETURN(1); } XS_INTERNAL(XS_Clownfish_String_to_string); XS_INTERNAL(XS_Clownfish_String_to_string) { dXSARGS; cfish_String* arg_self; CFISH_Str_To_String_t method; cfish_String* retval; CFISH_UNUSED_VAR(cv); SP -= items; if (items != 1) { XSBind_invalid_args_error(aTHX_ cv, "self"); } /* Extract vars from Perl stack. */ arg_self = (cfish_String*)XSBind_perl_to_cfish_noinc(aTHX_ ST(0), CFISH_STRING, NULL); /* Execute */ method = CFISH_METHOD_PTR(CFISH_STRING, CFISH_Str_To_String); retval = method(arg_self); ST(0) = XSBind_cfish_to_perl(aTHX_ (cfish_Obj*)retval); CFISH_DECREF(retval); sv_2mortal( ST(0) ); XSRETURN(1); } XS_INTERNAL(XS_Clownfish_String_trim); XS_INTERNAL(XS_Clownfish_String_trim) { dXSARGS; cfish_String* arg_self; CFISH_Str_Trim_t method; cfish_String* retval; CFISH_UNUSED_VAR(cv); SP -= items; if (items != 1) { XSBind_invalid_args_error(aTHX_ cv, "self"); } /* Extract vars from Perl stack. */ arg_self = (cfish_String*)XSBind_perl_to_cfish_noinc(aTHX_ ST(0), CFISH_STRING, NULL); /* Execute */ method = CFISH_METHOD_PTR(CFISH_STRING, CFISH_Str_Trim); retval = method(arg_self); ST(0) = XSBind_cfish_to_perl(aTHX_ (cfish_Obj*)retval); CFISH_DECREF(retval); sv_2mortal( ST(0) ); XSRETURN(1); } XS_INTERNAL(XS_Clownfish_String_trim_top); XS_INTERNAL(XS_Clownfish_String_trim_top) { dXSARGS; cfish_String* arg_self; CFISH_Str_Trim_Top_t method; cfish_String* retval; CFISH_UNUSED_VAR(cv); SP -= items; if (items != 1) { XSBind_invalid_args_error(aTHX_ cv, "self"); } /* Extract vars from Perl stack. */ arg_self = (cfish_String*)XSBind_perl_to_cfish_noinc(aTHX_ ST(0), CFISH_STRING, NULL); /* Execute */ method = CFISH_METHOD_PTR(CFISH_STRING, CFISH_Str_Trim_Top); retval = method(arg_self); ST(0) = XSBind_cfish_to_perl(aTHX_ (cfish_Obj*)retval); CFISH_DECREF(retval); sv_2mortal( ST(0) ); XSRETURN(1); } XS_INTERNAL(XS_Clownfish_String_trim_tail); XS_INTERNAL(XS_Clownfish_String_trim_tail) { dXSARGS; cfish_String* arg_self; CFISH_Str_Trim_Tail_t method; cfish_String* retval; CFISH_UNUSED_VAR(cv); SP -= items; if (items != 1) { XSBind_invalid_args_error(aTHX_ cv, "self"); } /* Extract vars from Perl stack. */ arg_self = (cfish_String*)XSBind_perl_to_cfish_noinc(aTHX_ ST(0), CFISH_STRING, NULL); /* Execute */ method = CFISH_METHOD_PTR(CFISH_STRING, CFISH_Str_Trim_Tail); retval = method(arg_self); ST(0) = XSBind_cfish_to_perl(aTHX_ (cfish_Obj*)retval); CFISH_DECREF(retval); sv_2mortal( ST(0) ); XSRETURN(1); } XS_INTERNAL(XS_Clownfish_String_code_point_at); XS_INTERNAL(XS_Clownfish_String_code_point_at) { dXSARGS; SV *sv; cfish_String* arg_self; size_t arg_tick; CFISH_Str_Code_Point_At_t method; int32_t retval; CFISH_UNUSED_VAR(cv); SP -= items; if (items != 2) { XSBind_invalid_args_error(aTHX_ cv, "self, tick"); } /* Extract vars from Perl stack. */ arg_self = (cfish_String*)XSBind_perl_to_cfish_noinc(aTHX_ ST(0), CFISH_STRING, NULL); sv = ST(1); if (!XSBind_sv_defined(aTHX_ sv)) { XSBind_undef_arg_error(aTHX_ "tick"); } arg_tick = (size_t)SvIV(sv); /* Execute */ method = CFISH_METHOD_PTR(CFISH_STRING, CFISH_Str_Code_Point_At); retval = method(arg_self, arg_tick); ST(0) = newSViv(retval); sv_2mortal( ST(0) ); XSRETURN(1); } XS_INTERNAL(XS_Clownfish_String_code_point_from); XS_INTERNAL(XS_Clownfish_String_code_point_from) { dXSARGS; SV *sv; cfish_String* arg_self; size_t arg_tick; CFISH_Str_Code_Point_From_t method; int32_t retval; CFISH_UNUSED_VAR(cv); SP -= items; if (items != 2) { XSBind_invalid_args_error(aTHX_ cv, "self, tick"); } /* Extract vars from Perl stack. */ arg_self = (cfish_String*)XSBind_perl_to_cfish_noinc(aTHX_ ST(0), CFISH_STRING, NULL); sv = ST(1); if (!XSBind_sv_defined(aTHX_ sv)) { XSBind_undef_arg_error(aTHX_ "tick"); } arg_tick = (size_t)SvIV(sv); /* Execute */ method = CFISH_METHOD_PTR(CFISH_STRING, CFISH_Str_Code_Point_From); retval = method(arg_self, arg_tick); ST(0) = newSViv(retval); sv_2mortal( ST(0) ); XSRETURN(1); } XS_INTERNAL(XS_Clownfish_String_substring); XS_INTERNAL(XS_Clownfish_String_substring) { dXSARGS; static const XSBind_ParamSpec param_specs[2] = { XSBIND_PARAM("offset", 1), XSBIND_PARAM("length", 1) }; int32_t locations[2]; SV *sv; cfish_String* arg_self; size_t arg_offset; size_t arg_length; CFISH_Str_SubString_t method; cfish_String* retval; CFISH_UNUSED_VAR(cv); if (items < 1) { XSBind_invalid_args_error(aTHX_ cv, "self, ..."); } SP -= items; /* Locate args on Perl stack. */ XSBind_locate_args(aTHX_ &ST(0), 1, items, param_specs, locations, 2); arg_self = (cfish_String*)XSBind_perl_to_cfish_noinc(aTHX_ ST(0), CFISH_STRING, NULL); sv = ST(locations[0]); if (!XSBind_sv_defined(aTHX_ sv)) { XSBind_undef_arg_error(aTHX_ "offset"); } arg_offset = (size_t)SvIV(sv); sv = ST(locations[1]); if (!XSBind_sv_defined(aTHX_ sv)) { XSBind_undef_arg_error(aTHX_ "length"); } arg_length = (size_t)SvIV(sv); /* Execute */ method = CFISH_METHOD_PTR(CFISH_STRING, CFISH_Str_SubString); retval = method(arg_self, arg_offset, arg_length); ST(0) = XSBind_cfish_to_perl(aTHX_ (cfish_Obj*)retval); CFISH_DECREF(retval); sv_2mortal( ST(0) ); XSRETURN(1); } XS_INTERNAL(XS_Clownfish_String_top); XS_INTERNAL(XS_Clownfish_String_top) { dXSARGS; cfish_String* arg_self; CFISH_Str_Top_t method; cfish_StringIterator* retval; CFISH_UNUSED_VAR(cv); SP -= items; if (items != 1) { XSBind_invalid_args_error(aTHX_ cv, "self"); } /* Extract vars from Perl stack. */ arg_self = (cfish_String*)XSBind_perl_to_cfish_noinc(aTHX_ ST(0), CFISH_STRING, NULL); /* Execute */ method = CFISH_METHOD_PTR(CFISH_STRING, CFISH_Str_Top); retval = method(arg_self); ST(0) = XSBind_cfish_to_perl(aTHX_ (cfish_Obj*)retval); CFISH_DECREF(retval); sv_2mortal( ST(0) ); XSRETURN(1); } XS_INTERNAL(XS_Clownfish_String_tail); XS_INTERNAL(XS_Clownfish_String_tail) { dXSARGS; cfish_String* arg_self; CFISH_Str_Tail_t method; cfish_StringIterator* retval; CFISH_UNUSED_VAR(cv); SP -= items; if (items != 1) { XSBind_invalid_args_error(aTHX_ cv, "self"); } /* Extract vars from Perl stack. */ arg_self = (cfish_String*)XSBind_perl_to_cfish_noinc(aTHX_ ST(0), CFISH_STRING, NULL); /* Execute */ method = CFISH_METHOD_PTR(CFISH_STRING, CFISH_Str_Tail); retval = method(arg_self); ST(0) = XSBind_cfish_to_perl(aTHX_ (cfish_Obj*)retval); CFISH_DECREF(retval); sv_2mortal( ST(0) ); XSRETURN(1); } XS_INTERNAL(XS_Clownfish_String_DESTROY); XS_INTERNAL(XS_Clownfish_String_DESTROY) { dXSARGS; cfish_String* arg_self; CFISH_Str_Destroy_t method; CFISH_UNUSED_VAR(cv); SP -= items; if (items != 1) { XSBind_invalid_args_error(aTHX_ cv, "self"); } /* Extract vars from Perl stack. */ arg_self = (cfish_String*)XSBind_perl_to_cfish_noinc(aTHX_ ST(0), CFISH_STRING, NULL); /* Execute */ method = CFISH_METHOD_PTR(CFISH_STRING, CFISH_Str_Destroy); method(arg_self); XSRETURN(0); } XS_INTERNAL(XS_Clownfish_StringIterator_clone); XS_INTERNAL(XS_Clownfish_StringIterator_clone) { dXSARGS; cfish_StringIterator* arg_self; CFISH_StrIter_Clone_t method; cfish_StringIterator* retval; CFISH_UNUSED_VAR(cv); SP -= items; if (items != 1) { XSBind_invalid_args_error(aTHX_ cv, "self"); } /* Extract vars from Perl stack. */ arg_self = (cfish_StringIterator*)XSBind_perl_to_cfish_noinc(aTHX_ ST(0), CFISH_STRINGITERATOR, NULL); /* Execute */ method = CFISH_METHOD_PTR(CFISH_STRINGITERATOR, CFISH_StrIter_Clone); retval = method(arg_self); ST(0) = XSBind_cfish_to_perl(aTHX_ (cfish_Obj*)retval); CFISH_DECREF(retval); sv_2mortal( ST(0) ); XSRETURN(1); } XS_INTERNAL(XS_Clownfish_StringIterator_assign); XS_INTERNAL(XS_Clownfish_StringIterator_assign) { dXSARGS; SV *sv; cfish_StringIterator* arg_self; cfish_StringIterator* arg_other; CFISH_StrIter_Assign_t method; CFISH_UNUSED_VAR(cv); SP -= items; if (items != 2) { XSBind_invalid_args_error(aTHX_ cv, "self, other"); } /* Extract vars from Perl stack. */ arg_self = (cfish_StringIterator*)XSBind_perl_to_cfish_noinc(aTHX_ ST(0), CFISH_STRINGITERATOR, NULL); sv = ST(1); arg_other = (cfish_StringIterator*)XSBind_arg_to_cfish(aTHX_ sv, "other", CFISH_STRINGITERATOR, NULL); /* Execute */ method = CFISH_METHOD_PTR(CFISH_STRINGITERATOR, CFISH_StrIter_Assign); method(arg_self, arg_other); XSRETURN(0); } XS_INTERNAL(XS_Clownfish_StringIterator_equals); XS_INTERNAL(XS_Clownfish_StringIterator_equals) { dXSARGS; SV *sv; cfish_StringIterator* arg_self; cfish_Obj* arg_other; CFISH_StrIter_Equals_t method; bool retval; CFISH_UNUSED_VAR(cv); SP -= items; if (items != 2) { XSBind_invalid_args_error(aTHX_ cv, "self, other"); } /* Extract vars from Perl stack. */ arg_self = (cfish_StringIterator*)XSBind_perl_to_cfish_noinc(aTHX_ ST(0), CFISH_STRINGITERATOR, NULL); sv = ST(1); arg_other = (cfish_Obj*)XSBind_arg_to_cfish(aTHX_ sv, "other", CFISH_OBJ, CFISH_ALLOCA_OBJ(CFISH_STRING)); /* Execute */ method = CFISH_METHOD_PTR(CFISH_STRINGITERATOR, CFISH_StrIter_Equals); retval = method(arg_self, arg_other); ST(0) = newSViv(retval); sv_2mortal( ST(0) ); XSRETURN(1); } XS_INTERNAL(XS_Clownfish_StringIterator_compare_to); XS_INTERNAL(XS_Clownfish_StringIterator_compare_to) { dXSARGS; SV *sv; cfish_StringIterator* arg_self; cfish_Obj* arg_other; CFISH_StrIter_Compare_To_t method; int32_t retval; CFISH_UNUSED_VAR(cv); SP -= items; if (items != 2) { XSBind_invalid_args_error(aTHX_ cv, "self, other"); } /* Extract vars from Perl stack. */ arg_self = (cfish_StringIterator*)XSBind_perl_to_cfish_noinc(aTHX_ ST(0), CFISH_STRINGITERATOR, NULL); sv = ST(1); arg_other = (cfish_Obj*)XSBind_arg_to_cfish(aTHX_ sv, "other", CFISH_OBJ, CFISH_ALLOCA_OBJ(CFISH_STRING)); /* Execute */ method = CFISH_METHOD_PTR(CFISH_STRINGITERATOR, CFISH_StrIter_Compare_To); retval = method(arg_self, arg_other); ST(0) = newSViv(retval); sv_2mortal( ST(0) ); XSRETURN(1); } XS_INTERNAL(XS_Clownfish_StringIterator_has_next); XS_INTERNAL(XS_Clownfish_StringIterator_has_next) { dXSARGS; cfish_StringIterator* arg_self; CFISH_StrIter_Has_Next_t method; bool retval; CFISH_UNUSED_VAR(cv); SP -= items; if (items != 1) { XSBind_invalid_args_error(aTHX_ cv, "self"); } /* Extract vars from Perl stack. */ arg_self = (cfish_StringIterator*)XSBind_perl_to_cfish_noinc(aTHX_ ST(0), CFISH_STRINGITERATOR, NULL); /* Execute */ method = CFISH_METHOD_PTR(CFISH_STRINGITERATOR, CFISH_StrIter_Has_Next); retval = method(arg_self); ST(0) = newSViv(retval); sv_2mortal( ST(0) ); XSRETURN(1); } XS_INTERNAL(XS_Clownfish_StringIterator_has_prev); XS_INTERNAL(XS_Clownfish_StringIterator_has_prev) { dXSARGS; cfish_StringIterator* arg_self; CFISH_StrIter_Has_Prev_t method; bool retval; CFISH_UNUSED_VAR(cv); SP -= items; if (items != 1) { XSBind_invalid_args_error(aTHX_ cv, "self"); } /* Extract vars from Perl stack. */ arg_self = (cfish_StringIterator*)XSBind_perl_to_cfish_noinc(aTHX_ ST(0), CFISH_STRINGITERATOR, NULL); /* Execute */ method = CFISH_METHOD_PTR(CFISH_STRINGITERATOR, CFISH_StrIter_Has_Prev); retval = method(arg_self); ST(0) = newSViv(retval); sv_2mortal( ST(0) ); XSRETURN(1); } XS_INTERNAL(XS_Clownfish_StringIterator_advance); XS_INTERNAL(XS_Clownfish_StringIterator_advance) { dXSARGS; SV *sv; cfish_StringIterator* arg_self; size_t arg_num; CFISH_StrIter_Advance_t method; size_t retval; CFISH_UNUSED_VAR(cv); SP -= items; if (items != 2) { XSBind_invalid_args_error(aTHX_ cv, "self, num"); } /* Extract vars from Perl stack. */ arg_self = (cfish_StringIterator*)XSBind_perl_to_cfish_noinc(aTHX_ ST(0), CFISH_STRINGITERATOR, NULL); sv = ST(1); if (!XSBind_sv_defined(aTHX_ sv)) { XSBind_undef_arg_error(aTHX_ "num"); } arg_num = (size_t)SvIV(sv); /* Execute */ method = CFISH_METHOD_PTR(CFISH_STRINGITERATOR, CFISH_StrIter_Advance); retval = method(arg_self, arg_num); ST(0) = newSViv(retval); sv_2mortal( ST(0) ); XSRETURN(1); } XS_INTERNAL(XS_Clownfish_StringIterator_recede); XS_INTERNAL(XS_Clownfish_StringIterator_recede) { dXSARGS; SV *sv; cfish_StringIterator* arg_self; size_t arg_num; CFISH_StrIter_Recede_t method; size_t retval; CFISH_UNUSED_VAR(cv); SP -= items; if (items != 2) { XSBind_invalid_args_error(aTHX_ cv, "self, num"); } /* Extract vars from Perl stack. */ arg_self = (cfish_StringIterator*)XSBind_perl_to_cfish_noinc(aTHX_ ST(0), CFISH_STRINGITERATOR, NULL); sv = ST(1); if (!XSBind_sv_defined(aTHX_ sv)) { XSBind_undef_arg_error(aTHX_ "num"); } arg_num = (size_t)SvIV(sv); /* Execute */ method = CFISH_METHOD_PTR(CFISH_STRINGITERATOR, CFISH_StrIter_Recede); retval = method(arg_self, arg_num); ST(0) = newSViv(retval); sv_2mortal( ST(0) ); XSRETURN(1); } XS_INTERNAL(XS_Clownfish_StringIterator_skip_whitespace); XS_INTERNAL(XS_Clownfish_StringIterator_skip_whitespace) { dXSARGS; cfish_StringIterator* arg_self; CFISH_StrIter_Skip_Whitespace_t method; size_t retval; CFISH_UNUSED_VAR(cv); SP -= items; if (items != 1) { XSBind_invalid_args_error(aTHX_ cv, "self"); } /* Extract vars from Perl stack. */ arg_self = (cfish_StringIterator*)XSBind_perl_to_cfish_noinc(aTHX_ ST(0), CFISH_STRINGITERATOR, NULL); /* Execute */ method = CFISH_METHOD_PTR(CFISH_STRINGITERATOR, CFISH_StrIter_Skip_Whitespace); retval = method(arg_self); ST(0) = newSViv(retval); sv_2mortal( ST(0) ); XSRETURN(1); } XS_INTERNAL(XS_Clownfish_StringIterator_skip_whitespace_back); XS_INTERNAL(XS_Clownfish_StringIterator_skip_whitespace_back) { dXSARGS; cfish_StringIterator* arg_self; CFISH_StrIter_Skip_Whitespace_Back_t method; size_t retval; CFISH_UNUSED_VAR(cv); SP -= items; if (items != 1) { XSBind_invalid_args_error(aTHX_ cv, "self"); } /* Extract vars from Perl stack. */ arg_self = (cfish_StringIterator*)XSBind_perl_to_cfish_noinc(aTHX_ ST(0), CFISH_STRINGITERATOR, NULL); /* Execute */ method = CFISH_METHOD_PTR(CFISH_STRINGITERATOR, CFISH_StrIter_Skip_Whitespace_Back); retval = method(arg_self); ST(0) = newSViv(retval); sv_2mortal( ST(0) ); XSRETURN(1); } XS_INTERNAL(XS_Clownfish_StringIterator_starts_with); XS_INTERNAL(XS_Clownfish_StringIterator_starts_with) { dXSARGS; SV *sv; cfish_StringIterator* arg_self; cfish_String* arg_prefix; CFISH_StrIter_Starts_With_t method; bool retval; CFISH_UNUSED_VAR(cv); SP -= items; if (items != 2) { XSBind_invalid_args_error(aTHX_ cv, "self, prefix"); } /* Extract vars from Perl stack. */ arg_self = (cfish_StringIterator*)XSBind_perl_to_cfish_noinc(aTHX_ ST(0), CFISH_STRINGITERATOR, NULL); sv = ST(1); arg_prefix = (cfish_String*)XSBind_arg_to_cfish(aTHX_ sv, "prefix", CFISH_STRING, CFISH_ALLOCA_OBJ(CFISH_STRING)); /* Execute */ method = CFISH_METHOD_PTR(CFISH_STRINGITERATOR, CFISH_StrIter_Starts_With); retval = method(arg_self, arg_prefix); ST(0) = newSViv(retval); sv_2mortal( ST(0) ); XSRETURN(1); } XS_INTERNAL(XS_Clownfish_StringIterator_ends_with); XS_INTERNAL(XS_Clownfish_StringIterator_ends_with) { dXSARGS; SV *sv; cfish_StringIterator* arg_self; cfish_String* arg_suffix; CFISH_StrIter_Ends_With_t method; bool retval; CFISH_UNUSED_VAR(cv); SP -= items; if (items != 2) { XSBind_invalid_args_error(aTHX_ cv, "self, suffix"); } /* Extract vars from Perl stack. */ arg_self = (cfish_StringIterator*)XSBind_perl_to_cfish_noinc(aTHX_ ST(0), CFISH_STRINGITERATOR, NULL); sv = ST(1); arg_suffix = (cfish_String*)XSBind_arg_to_cfish(aTHX_ sv, "suffix", CFISH_STRING, CFISH_ALLOCA_OBJ(CFISH_STRING)); /* Execute */ method = CFISH_METHOD_PTR(CFISH_STRINGITERATOR, CFISH_StrIter_Ends_With); retval = method(arg_self, arg_suffix); ST(0) = newSViv(retval); sv_2mortal( ST(0) ); XSRETURN(1); } XS_INTERNAL(XS_Clownfish_StringIterator_DESTROY); XS_INTERNAL(XS_Clownfish_StringIterator_DESTROY) { dXSARGS; cfish_StringIterator* arg_self; CFISH_StrIter_Destroy_t method; CFISH_UNUSED_VAR(cv); SP -= items; if (items != 1) { XSBind_invalid_args_error(aTHX_ cv, "self"); } /* Extract vars from Perl stack. */ arg_self = (cfish_StringIterator*)XSBind_perl_to_cfish_noinc(aTHX_ ST(0), CFISH_STRINGITERATOR, NULL); /* Execute */ method = CFISH_METHOD_PTR(CFISH_STRINGITERATOR, CFISH_StrIter_Destroy); method(arg_self); XSRETURN(0); } XS_INTERNAL(XS_Clownfish_Err__new); XS_INTERNAL(XS_Clownfish_Err__new) { dXSARGS; static const XSBind_ParamSpec param_specs[1] = { XSBIND_PARAM("mess", 1) }; int32_t locations[1]; SV *sv; cfish_Err* arg_self; cfish_String* arg_mess; cfish_Err* retval; CFISH_UNUSED_VAR(cv); if (items < 1) { XSBind_invalid_args_error(aTHX_ cv, "class_name, ..."); } SP -= items; XSBind_locate_args(aTHX_ &ST(0), 1, items, param_specs, locations, 1); sv = ST(locations[0]); arg_mess = (cfish_String*)XSBind_arg_to_cfish(aTHX_ sv, "mess", CFISH_STRING, CFISH_ALLOCA_OBJ(CFISH_STRING)); arg_self = (cfish_Err*)XSBind_new_blank_obj(aTHX_ ST(0)); CFISH_INCREF(arg_mess); retval = cfish_Err_init(arg_self, arg_mess); ST(0) = sv_2mortal(CFISH_OBJ_TO_SV_NOINC(retval)); XSRETURN(1); } XS_INTERNAL(XS_Clownfish_Err_to_string); XS_INTERNAL(XS_Clownfish_Err_to_string) { dXSARGS; cfish_Err* arg_self; CFISH_Err_To_String_t method; cfish_String* retval; CFISH_UNUSED_VAR(cv); SP -= items; if (items != 1) { XSBind_invalid_args_error(aTHX_ cv, "self"); } /* Extract vars from Perl stack. */ arg_self = (cfish_Err*)XSBind_perl_to_cfish_noinc(aTHX_ ST(0), CFISH_ERR, NULL); /* Execute */ method = CFISH_METHOD_PTR(CFISH_ERR, CFISH_Err_To_String); retval = method(arg_self); ST(0) = XSBind_cfish_to_perl(aTHX_ (cfish_Obj*)retval); CFISH_DECREF(retval); sv_2mortal( ST(0) ); XSRETURN(1); } XS_INTERNAL(XS_Clownfish_Err_cat_mess); XS_INTERNAL(XS_Clownfish_Err_cat_mess) { dXSARGS; SV *sv; cfish_Err* arg_self; cfish_String* arg_mess; CFISH_Err_Cat_Mess_t method; CFISH_UNUSED_VAR(cv); SP -= items; if (items != 2) { XSBind_invalid_args_error(aTHX_ cv, "self, mess"); } /* Extract vars from Perl stack. */ arg_self = (cfish_Err*)XSBind_perl_to_cfish_noinc(aTHX_ ST(0), CFISH_ERR, NULL); sv = ST(1); arg_mess = (cfish_String*)XSBind_arg_to_cfish(aTHX_ sv, "mess", CFISH_STRING, CFISH_ALLOCA_OBJ(CFISH_STRING)); /* Execute */ method = CFISH_METHOD_PTR(CFISH_ERR, CFISH_Err_Cat_Mess); method(arg_self, arg_mess); XSRETURN(0); } XS_INTERNAL(XS_Clownfish_Err_get_mess); XS_INTERNAL(XS_Clownfish_Err_get_mess) { dXSARGS; cfish_Err* arg_self; CFISH_Err_Get_Mess_t method; cfish_String* retval; CFISH_UNUSED_VAR(cv); SP -= items; if (items != 1) { XSBind_invalid_args_error(aTHX_ cv, "self"); } /* Extract vars from Perl stack. */ arg_self = (cfish_Err*)XSBind_perl_to_cfish_noinc(aTHX_ ST(0), CFISH_ERR, NULL); /* Execute */ method = CFISH_METHOD_PTR(CFISH_ERR, CFISH_Err_Get_Mess); retval = method(arg_self); ST(0) = XSBind_cfish_to_perl(aTHX_ (cfish_Obj*)retval); sv_2mortal( ST(0) ); XSRETURN(1); } XS_INTERNAL(XS_Clownfish_Err_DESTROY); XS_INTERNAL(XS_Clownfish_Err_DESTROY) { dXSARGS; cfish_Err* arg_self; CFISH_Err_Destroy_t method; CFISH_UNUSED_VAR(cv); SP -= items; if (items != 1) { XSBind_invalid_args_error(aTHX_ cv, "self"); } /* Extract vars from Perl stack. */ arg_self = (cfish_Err*)XSBind_perl_to_cfish_noinc(aTHX_ ST(0), CFISH_ERR, NULL); /* Execute */ method = CFISH_METHOD_PTR(CFISH_ERR, CFISH_Err_Destroy); method(arg_self); XSRETURN(0); } MODULE = Clownfish PACKAGE = Clownfish BOOT: { static const cfish_XSBind_ClassSpec class_specs[] = { { "Clownfish::Obj", NULL, 6 }, { "Clownfish::Blob", "Clownfish::Obj", 5 }, { "Clownfish::TestHarness::TestSuiteRunner", "Clownfish::Obj", 8 }, { "Clownfish::TestHarness::TestBatchRunner", "Clownfish::Obj", 7 }, { "Clownfish::TestHarness::TestSuite", "Clownfish::Obj", 5 }, { "Clownfish::TestHarness::TestBatch", "Clownfish::Obj", 1 }, { "Clownfish::TestHarness::TestFormatter", "Clownfish::Obj", 3 }, { "Clownfish::TestHarness::TestFormatterCF", "Clownfish::TestHarness::TestFormatter", 3 }, { "Clownfish::TestHarness::TestFormatterTAP", "Clownfish::TestHarness::TestFormatter", 3 }, { "Clownfish::Float", "Clownfish::Obj", 6 }, { "Clownfish::Integer", "Clownfish::Obj", 6 }, { "Clownfish::Vector", "Clownfish::Obj", 19 }, { "Clownfish::Hash", "Clownfish::Obj", 11 }, { "Clownfish::Class", "Clownfish::Obj", 6 }, { "Clownfish::ByteBuf", "Clownfish::Obj", 11 }, { "Clownfish::CharBuf", "Clownfish::Obj", 10 }, { "Clownfish::Boolean", "Clownfish::Obj", 5 }, { "Clownfish::HashIterator", "Clownfish::Obj", 4 }, { "Clownfish::Method", "Clownfish::Obj", 6 }, { "Clownfish::String", "Clownfish::Obj", 26 }, { "Clownfish::StringIterator", "Clownfish::Obj", 13 }, { "Clownfish::Err", "Clownfish::Obj", 5 } }; static const cfish_XSBind_XSubSpec xsub_specs[] = { { "new", XS_Clownfish_Obj_new }, { "clone", XS_Clownfish_Obj_clone }, { "equals", XS_Clownfish_Obj_equals }, { "compare_to", XS_Clownfish_Obj_compare_to }, { "DESTROY", XS_Clownfish_Obj_DESTROY }, { "to_string", XS_Clownfish_Obj_to_string }, { "get_size", XS_Clownfish_Blob_get_size }, { "equals", XS_Clownfish_Blob_equals }, { "compare_to", XS_Clownfish_Blob_compare_to }, { "clone", XS_Clownfish_Blob_clone }, { "DESTROY", XS_Clownfish_Blob_DESTROY }, { "new", XS_Clownfish_TestHarness_TestSuiteRunner_new }, { "DESTROY", XS_Clownfish_TestHarness_TestSuiteRunner_DESTROY }, { "run_batch", XS_Clownfish_TestHarness_TestSuiteRunner_run_batch }, { "finish", XS_Clownfish_TestHarness_TestSuiteRunner_finish }, { "get_num_tests", XS_Clownfish_TestHarness_TestSuiteRunner_get_num_tests }, { "get_num_tests_failed", XS_Clownfish_TestHarness_TestSuiteRunner_get_num_tests_failed }, { "get_num_batches", XS_Clownfish_TestHarness_TestSuiteRunner_get_num_batches }, { "get_num_batches_failed", XS_Clownfish_TestHarness_TestSuiteRunner_get_num_batches_failed }, { "new", XS_Clownfish_TestHarness_TestBatchRunner_new }, { "DESTROY", XS_Clownfish_TestHarness_TestBatchRunner_DESTROY }, { "run_batch", XS_Clownfish_TestHarness_TestBatchRunner_run_batch }, { "plan", XS_Clownfish_TestHarness_TestBatchRunner_plan }, { "get_num_planned", XS_Clownfish_TestHarness_TestBatchRunner_get_num_planned }, { "get_num_tests", XS_Clownfish_TestHarness_TestBatchRunner_get_num_tests }, { "get_num_failed", XS_Clownfish_TestHarness_TestBatchRunner_get_num_failed }, { "new", XS_Clownfish_TestHarness_TestSuite_new }, { "DESTROY", XS_Clownfish_TestHarness_TestSuite_DESTROY }, { "add_batch", XS_Clownfish_TestHarness_TestSuite_add_batch }, { "run_batch", XS_Clownfish_TestHarness_TestSuite_run_batch }, { "run_all_batches", XS_Clownfish_TestHarness_TestSuite_run_all_batches }, { "run", XS_Clownfish_TestHarness_TestBatch_run }, { "new", XS_Clownfish_TestHarness_TestFormatter_new }, { "batch_prologue", XS_Clownfish_TestHarness_TestFormatter_batch_prologue }, { "summary", XS_Clownfish_TestHarness_TestFormatter_summary }, { "new", XS_Clownfish_TestHarness_TestFormatterCF_new }, { "batch_prologue", XS_Clownfish_TestHarness_TestFormatterCF_batch_prologue }, { "summary", XS_Clownfish_TestHarness_TestFormatterCF_summary }, { "new", XS_Clownfish_TestHarness_TestFormatterTAP_new }, { "batch_prologue", XS_Clownfish_TestHarness_TestFormatterTAP_batch_prologue }, { "summary", XS_Clownfish_TestHarness_TestFormatterTAP_summary }, { "get_value", XS_Clownfish_Float_get_value }, { "to_i64", XS_Clownfish_Float_to_i64 }, { "to_string", XS_Clownfish_Float_to_string }, { "equals", XS_Clownfish_Float_equals }, { "compare_to", XS_Clownfish_Float_compare_to }, { "clone", XS_Clownfish_Float_clone }, { "get_value", XS_Clownfish_Integer_get_value }, { "to_f64", XS_Clownfish_Integer_to_f64 }, { "to_string", XS_Clownfish_Integer_to_string }, { "equals", XS_Clownfish_Integer_equals }, { "compare_to", XS_Clownfish_Integer_compare_to }, { "clone", XS_Clownfish_Integer_clone }, { "new", XS_Clownfish_Vector_new }, { "push", XS_Clownfish_Vector_push }, { "push_all", XS_Clownfish_Vector_push_all }, { "pop", XS_Clownfish_Vector_pop }, { "insert", XS_Clownfish_Vector_insert }, { "insert_all", XS_Clownfish_Vector_insert_all }, { "grow", XS_Clownfish_Vector_grow }, { "fetch", XS_Clownfish_Vector_fetch }, { "delete", XS_Clownfish_Vector_delete }, { "excise", XS_Clownfish_Vector_excise }, { "clone", XS_Clownfish_Vector_clone }, { "sort", XS_Clownfish_Vector_sort }, { "resize", XS_Clownfish_Vector_resize }, { "clear", XS_Clownfish_Vector_clear }, { "get_size", XS_Clownfish_Vector_get_size }, { "get_capacity", XS_Clownfish_Vector_get_capacity }, { "slice", XS_Clownfish_Vector_slice }, { "equals", XS_Clownfish_Vector_equals }, { "DESTROY", XS_Clownfish_Vector_DESTROY }, { "new", XS_Clownfish_Hash_new }, { "clear", XS_Clownfish_Hash_clear }, { "fetch", XS_Clownfish_Hash_fetch }, { "delete", XS_Clownfish_Hash_delete }, { "has_key", XS_Clownfish_Hash_has_key }, { "keys", XS_Clownfish_Hash_keys }, { "values", XS_Clownfish_Hash_values }, { "get_capacity", XS_Clownfish_Hash_get_capacity }, { "get_size", XS_Clownfish_Hash_get_size }, { "equals", XS_Clownfish_Hash_equals }, { "DESTROY", XS_Clownfish_Hash_DESTROY }, { "make_obj", XS_Clownfish_Class_make_obj }, { "get_name", XS_Clownfish_Class_get_name }, { "get_parent", XS_Clownfish_Class_get_parent }, { "get_obj_alloc_size", XS_Clownfish_Class_get_obj_alloc_size }, { "get_methods", XS_Clownfish_Class_get_methods }, { "DESTROY", XS_Clownfish_Class_DESTROY }, { "set_size", XS_Clownfish_ByteBuf_set_size }, { "get_size", XS_Clownfish_ByteBuf_get_size }, { "get_capacity", XS_Clownfish_ByteBuf_get_capacity }, { "cat", XS_Clownfish_ByteBuf_cat }, { "yield_blob", XS_Clownfish_ByteBuf_yield_blob }, { "utf8_to_string", XS_Clownfish_ByteBuf_utf8_to_string }, { "trusted_utf8_to_string", XS_Clownfish_ByteBuf_trusted_utf8_to_string }, { "equals", XS_Clownfish_ByteBuf_equals }, { "compare_to", XS_Clownfish_ByteBuf_compare_to }, { "clone", XS_Clownfish_ByteBuf_clone }, { "DESTROY", XS_Clownfish_ByteBuf_DESTROY }, { "new", XS_Clownfish_CharBuf_new }, { "cat", XS_Clownfish_CharBuf_cat }, { "cat_char", XS_Clownfish_CharBuf_cat_char }, { "grow", XS_Clownfish_CharBuf_grow }, { "clear", XS_Clownfish_CharBuf_clear }, { "get_size", XS_Clownfish_CharBuf_get_size }, { "clone", XS_Clownfish_CharBuf_clone }, { "to_string", XS_Clownfish_CharBuf_to_string }, { "yield_string", XS_Clownfish_CharBuf_yield_string }, { "DESTROY", XS_Clownfish_CharBuf_DESTROY }, { "get_value", XS_Clownfish_Boolean_get_value }, { "clone", XS_Clownfish_Boolean_clone }, { "equals", XS_Clownfish_Boolean_equals }, { "to_string", XS_Clownfish_Boolean_to_string }, { "DESTROY", XS_Clownfish_Boolean_DESTROY }, { "next", XS_Clownfish_HashIterator_next }, { "get_key", XS_Clownfish_HashIterator_get_key }, { "get_value", XS_Clownfish_HashIterator_get_value }, { "DESTROY", XS_Clownfish_HashIterator_DESTROY }, { "get_name", XS_Clownfish_Method_get_name }, { "set_host_alias", XS_Clownfish_Method_set_host_alias }, { "get_host_alias", XS_Clownfish_Method_get_host_alias }, { "is_excluded_from_host", XS_Clownfish_Method_is_excluded_from_host }, { "host_name", XS_Clownfish_Method_host_name }, { "DESTROY", XS_Clownfish_Method_DESTROY }, { "cat", XS_Clownfish_String_cat }, { "to_i64", XS_Clownfish_String_to_i64 }, { "basex_to_i64", XS_Clownfish_String_basex_to_i64 }, { "to_f64", XS_Clownfish_String_to_f64 }, { "starts_with", XS_Clownfish_String_starts_with }, { "ends_with", XS_Clownfish_String_ends_with }, { "contains", XS_Clownfish_String_contains }, { "find", XS_Clownfish_String_find }, { "equals", XS_Clownfish_String_equals }, { "length", XS_Clownfish_String_length }, { "get_size", XS_Clownfish_String_get_size }, { "to_bytebuf", XS_Clownfish_String_to_bytebuf }, { "clone", XS_Clownfish_String_clone }, { "is_copy_on_incref", XS_Clownfish_String_is_copy_on_incref }, { "compare_to", XS_Clownfish_String_compare_to }, { "hash_sum", XS_Clownfish_String_hash_sum }, { "to_string", XS_Clownfish_String_to_string }, { "trim", XS_Clownfish_String_trim }, { "trim_top", XS_Clownfish_String_trim_top }, { "trim_tail", XS_Clownfish_String_trim_tail }, { "code_point_at", XS_Clownfish_String_code_point_at }, { "code_point_from", XS_Clownfish_String_code_point_from }, { "substring", XS_Clownfish_String_substring }, { "top", XS_Clownfish_String_top }, { "tail", XS_Clownfish_String_tail }, { "DESTROY", XS_Clownfish_String_DESTROY }, { "clone", XS_Clownfish_StringIterator_clone }, { "assign", XS_Clownfish_StringIterator_assign }, { "equals", XS_Clownfish_StringIterator_equals }, { "compare_to", XS_Clownfish_StringIterator_compare_to }, { "has_next", XS_Clownfish_StringIterator_has_next }, { "has_prev", XS_Clownfish_StringIterator_has_prev }, { "advance", XS_Clownfish_StringIterator_advance }, { "recede", XS_Clownfish_StringIterator_recede }, { "skip_whitespace", XS_Clownfish_StringIterator_skip_whitespace }, { "skip_whitespace_back", XS_Clownfish_StringIterator_skip_whitespace_back }, { "starts_with", XS_Clownfish_StringIterator_starts_with }, { "ends_with", XS_Clownfish_StringIterator_ends_with }, { "DESTROY", XS_Clownfish_StringIterator_DESTROY }, { "_new", XS_Clownfish_Err__new }, { "to_string", XS_Clownfish_Err_to_string }, { "cat_mess", XS_Clownfish_Err_cat_mess }, { "get_mess", XS_Clownfish_Err_get_mess }, { "DESTROY", XS_Clownfish_Err_DESTROY } }; size_t num_classes = sizeof(class_specs) / sizeof(class_specs[0]); const char* file = __FILE__; cfish_bootstrap_perl(); cfish_XSBind_bootstrap(aTHX_ num_classes, class_specs, xsub_specs, file); } MODULE = Clownfish PACKAGE = Clownfish SV* to_clownfish(sv) SV *sv; CODE: { cfish_Obj *obj = XSBind_perl_to_cfish_nullable(aTHX_ sv, CFISH_OBJ); RETVAL = CFISH_OBJ_TO_SV_NOINC(obj); } OUTPUT: RETVAL MODULE = Clownfish PACKAGE = Clownfish::Blob SV* new(either_sv, sv) SV *either_sv; SV *sv; CODE: { STRLEN size; char *ptr = SvPV(sv, size); cfish_Blob *self = (cfish_Blob*)XSBind_new_blank_obj(aTHX_ either_sv); cfish_Blob_init(self, ptr, size); RETVAL = CFISH_OBJ_TO_SV_NOINC(self); } OUTPUT: RETVAL MODULE = Clownfish PACKAGE = Clownfish::Boolean SV* singleton(either_sv, value) SV *either_sv; bool value; CODE: { CFISH_UNUSED_VAR(either_sv); RETVAL = CFISH_OBJ_TO_SV_INC(cfish_Bool_singleton(value)); } OUTPUT: RETVAL MODULE = Clownfish PACKAGE = Clownfish::ByteBuf SV* new(either_sv, sv) SV *either_sv; SV *sv; CODE: { STRLEN size; char *ptr = SvPV(sv, size); cfish_ByteBuf *self = (cfish_ByteBuf*)XSBind_new_blank_obj(aTHX_ either_sv); cfish_BB_init_bytes(self, ptr, size); RETVAL = CFISH_OBJ_TO_SV_NOINC(self); } OUTPUT: RETVAL MODULE = Clownfish PACKAGE = Clownfish::Class SV* fetch_class(unused_sv, class_name) SV *unused_sv; cfish_String *class_name; CODE: { cfish_Class *klass = cfish_Class_fetch_class(class_name); CFISH_UNUSED_VAR(unused_sv); RETVAL = klass ? (SV*)CFISH_Class_To_Host(klass, NULL) : &PL_sv_undef; } OUTPUT: RETVAL SV* singleton(unused_sv, ...) SV *unused_sv; CODE: { static const XSBind_ParamSpec param_specs[2] = { XSBIND_PARAM("class_name", true), XSBIND_PARAM("parent", false), }; int32_t locations[2]; cfish_String *class_name = NULL; cfish_Class *parent = NULL; cfish_Class *singleton = NULL; CFISH_UNUSED_VAR(unused_sv); XSBind_locate_args(aTHX_ &(ST(0)), 1, items, param_specs, locations, 2); class_name = (cfish_String*)XSBind_arg_to_cfish( aTHX_ ST(locations[0]), "class_name", CFISH_STRING, CFISH_ALLOCA_OBJ(CFISH_STRING)); if (locations[1] < items) { parent = (cfish_Class*)XSBind_arg_to_cfish_nullable( aTHX_ ST(locations[1]), "parent", CFISH_CLASS, NULL); } singleton = cfish_Class_singleton(class_name, parent); RETVAL = (SV*)CFISH_Class_To_Host(singleton, NULL); } OUTPUT: RETVAL MODULE = Clownfish PACKAGE = Clownfish::Err SV* trap(routine_sv, context_sv) SV *routine_sv; SV *context_sv; CODE: cfish_Err *error = XSBind_trap(routine_sv, context_sv); RETVAL = CFISH_OBJ_TO_SV_NOINC(error); OUTPUT: RETVAL MODULE = Clownfish PACKAGE = Clownfish::Float SV* new(either_sv, value) SV *either_sv; double value; CODE: { cfish_Float *self = (cfish_Float*)XSBind_new_blank_obj(aTHX_ either_sv); cfish_Float_init(self, value); RETVAL = CFISH_OBJ_TO_SV_NOINC(self); } OUTPUT: RETVAL MODULE = Clownfish PACKAGE = Clownfish::Hash SV* fetch_raw(self, key) cfish_Hash *self; cfish_String *key; CODE: RETVAL = CFISH_OBJ_TO_SV_INC(CFISH_Hash_Fetch(self, key)); OUTPUT: RETVAL void store(self, key, value_sv); cfish_Hash *self; cfish_String *key; SV *value_sv; PPCODE: { cfish_Obj *value = (cfish_Obj*)XSBind_perl_to_cfish_nullable(aTHX_ value_sv, CFISH_OBJ); CFISH_Hash_Store(self, key, value); } MODULE = Clownfish PACKAGE = Clownfish::HashIterator SV* new(either_sv, hash) SV *either_sv; cfish_Hash *hash; CODE: { cfish_HashIterator *self = (cfish_HashIterator*)XSBind_new_blank_obj(aTHX_ either_sv); cfish_HashIter_init(self, hash); RETVAL = CFISH_OBJ_TO_SV_NOINC(self); } OUTPUT: RETVAL MODULE = Clownfish PACKAGE = Clownfish::Integer SV* new(either_sv, value) SV *either_sv; int64_t value; CODE: { cfish_Integer *self = (cfish_Integer*)XSBind_new_blank_obj(aTHX_ either_sv); cfish_Int_init(self, value); RETVAL = CFISH_OBJ_TO_SV_NOINC(self); } OUTPUT: RETVAL MODULE = Clownfish PACKAGE = Clownfish::Obj SV* get_class(self) cfish_Obj *self CODE: cfish_Class *klass = cfish_Obj_get_class(self); RETVAL = (SV*)CFISH_Class_To_Host(klass, NULL); OUTPUT: RETVAL SV* get_class_name(self) cfish_Obj *self CODE: cfish_String *class_name = cfish_Obj_get_class_name(self); RETVAL = (SV*)CFISH_Str_To_Host(class_name, NULL); OUTPUT: RETVAL bool is_a(self, class_name) cfish_Obj *self; cfish_String *class_name; CODE: { cfish_Class *target = cfish_Class_fetch_class(class_name); RETVAL = cfish_Obj_is_a(self, target); } OUTPUT: RETVAL SV* clone_raw(self) cfish_Obj *self; CODE: RETVAL = CFISH_OBJ_TO_SV_NOINC(CFISH_Obj_Clone(self)); OUTPUT: RETVAL SV* to_perl(self) cfish_Obj *self; CODE: RETVAL = (SV*)CFISH_Obj_To_Host(self, NULL); OUTPUT: RETVAL MODULE = Clownfish PACKAGE = Clownfish::String SV* new(either_sv, sv) SV *either_sv; SV *sv; CODE: { STRLEN size; char *ptr = SvPVutf8(sv, size); cfish_String *self = (cfish_String*)XSBind_new_blank_obj(aTHX_ either_sv); cfish_Str_init_from_trusted_utf8(self, ptr, size); RETVAL = CFISH_OBJ_TO_SV_NOINC(self); } OUTPUT: RETVAL MODULE = Clownfish PACKAGE = Clownfish::StringIterator SV* next(self) cfish_StringIterator *self; CODE: { int32_t cp = CFISH_StrIter_Next(self); if (cp == CFISH_STR_OOB) { RETVAL = &PL_sv_undef; } else if (cp == 0) { /* Zero but true. */ RETVAL = newSVpvn("0e0", 3); } else { RETVAL = newSViv(cp); } } OUTPUT: RETVAL SV* prev(self) cfish_StringIterator *self; CODE: { int32_t cp = CFISH_StrIter_Prev(self); if (cp == CFISH_STR_OOB) { RETVAL = &PL_sv_undef; } else if (cp == 0) { /* Zero but true. */ RETVAL = newSVpvn("0e0", 3); } else { RETVAL = newSViv(cp); } } OUTPUT: RETVAL MODULE = Clownfish PACKAGE = Clownfish::Vector SV* pop_raw(self) cfish_Vector *self; CODE: RETVAL = CFISH_OBJ_TO_SV_NOINC(CFISH_Vec_Pop(self)); OUTPUT: RETVAL SV* delete_raw(self, tick) cfish_Vector *self; uint32_t tick; CODE: RETVAL = CFISH_OBJ_TO_SV_NOINC(CFISH_Vec_Delete(self, tick)); OUTPUT: RETVAL void store(self, tick, value); cfish_Vector *self; uint32_t tick; cfish_Obj *value; PPCODE: { if (value) { CFISH_INCREF(value); } CFISH_Vec_Store(self, tick, value); } SV* fetch_raw(self, tick) cfish_Vector *self; uint32_t tick; CODE: RETVAL = CFISH_OBJ_TO_SV_INC(CFISH_Vec_Fetch(self, tick)); OUTPUT: RETVAL