You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
@@ -648,8 +657,7 @@ function_return function_c_interface_invoke(function func, function_impl impl, f
648
657
649
658
if (args_size != signature_count(s))
650
659
{
651
-
log_write("metacall", LOG_LEVEL_ERROR, "Invalid number of arguments when calling %s (canceling call in order to avoid a segfault)", function_name(func));
652
-
returnNULL;
660
+
returnmetacall_error_throw("C Loader Error", 0, "", "Invalid number of arguments when calling %s (canceling call in order to avoid a segfault)", function_name(func));
"Return type %s in of function %s is not supported, buffer is unsafe to be returned because there is no way to reconstruct it without overflowing as there is no null character nor size information.",
"Return type %s in of function %s is not supported, array is unsafe to be returned because there is no way to reconstruct it without overflowing as there is no null character nor size information.",
772
+
type_id_name(ret_id),
773
+
function_name(func));
774
+
}
775
+
elseif (ret_id == TYPE_PTR)
776
+
{
777
+
ret = value_create_ptr(result);
778
+
}
711
779
}
712
780
713
781
/* Clear allocated closures if any */
@@ -800,6 +868,7 @@ int c_loader_impl_initialize_types(loader_impl impl)
800
868
{ TYPE_BOOL, "bool" },
801
869
802
870
{ TYPE_CHAR, "char" },
871
+
{ TYPE_CHAR, "unsigned char" },
803
872
{ TYPE_CHAR, "int8_t" },
804
873
{ TYPE_CHAR, "uint8_t" },
805
874
{ TYPE_CHAR, "int_least8_t" },
@@ -808,6 +877,7 @@ int c_loader_impl_initialize_types(loader_impl impl)
808
877
{ TYPE_CHAR, "uint_fast8_t" },
809
878
810
879
{ TYPE_SHORT, "short" },
880
+
{ TYPE_SHORT, "unsigned short" },
811
881
{ TYPE_SHORT, "int16_t" },
812
882
{ TYPE_SHORT, "uint16_t" },
813
883
{ TYPE_SHORT, "int_least16_t" },
@@ -816,6 +886,7 @@ int c_loader_impl_initialize_types(loader_impl impl)
816
886
{ TYPE_SHORT, "uint_fast16_t" },
817
887
818
888
{ TYPE_INT, "int" },
889
+
{ TYPE_INT, "unsigned int" },
819
890
{ TYPE_INT, "uint32_t" },
820
891
{ TYPE_INT, "int32_t" },
821
892
{ TYPE_INT, "int_least32_t" },
@@ -824,7 +895,9 @@ int c_loader_impl_initialize_types(loader_impl impl)
824
895
{ TYPE_INT, "uint_fast32_t" },
825
896
826
897
{ TYPE_LONG, "long" },
898
+
{ TYPE_LONG, "unsigned long" },
827
899
{ TYPE_LONG, "long long" },
900
+
{ TYPE_LONG, "unsigned long long" },
828
901
{ TYPE_LONG, "uint64_t" },
829
902
{ TYPE_LONG, "int64_t" },
830
903
{ TYPE_LONG, "int_least64_t" },
@@ -838,6 +911,11 @@ int c_loader_impl_initialize_types(loader_impl impl)
0 commit comments