@@ -530,6 +530,7 @@ class c_loader_pointer_type : public c_loader_type_impl
530530 // TODO: This may be too tricky to implement because it is impossible to reconstruct the pointer from the type
531531 // easily, as C does not mantain the true memory layout, pointers can be arrays or single elements and we cannot know
532532 // We should review this carefully
533+ (void )arg_ptr;
533534#if 0
534535 CXType type_iterator = cx_type;
535536 value prev_value = value_create_ptr(NULL);
@@ -743,7 +744,7 @@ function_return function_c_interface_invoke(function func, function_impl impl, f
743744 for (size_t args_count = 0 ; args_count < args_size; ++args_count)
744745 {
745746 type t = signature_get_type (s, args_count);
746- type_impl impl_type = type_derived (t);
747+ /* type_impl impl_type = type_derived(t); */
747748 type_id id = type_index (t);
748749 type_id value_id = value_type_id ((value)args[args_count]);
749750
@@ -769,7 +770,10 @@ function_return function_c_interface_invoke(function func, function_impl impl, f
769770
770771 closures.push_back (closure);
771772 }
773+ #if 0
772774 else if (id == TYPE_STRING || (id == TYPE_PTR && impl_type != nullptr))
775+ #endif
776+ else if (id == TYPE_STRING)
773777 {
774778 /* String requires to be pointer to a string and
775779 Pointer requires to be pointer to pointer */
@@ -832,7 +836,7 @@ function_return function_c_interface_invoke(function func, function_impl impl, f
832836 for (size_t args_count = 0 ; args_count < args_size; ++args_count)
833837 {
834838 type t = signature_get_type (s, args_count);
835- type_impl impl_type = type_derived (t);
839+ /* type_impl impl_type = type_derived(t); */
836840 type_id id = type_index (t);
837841
838842 /* This is very tricky, if the type was a pointer to pointer, if it
@@ -846,21 +850,24 @@ function_return function_c_interface_invoke(function func, function_impl impl, f
846850 highly unsafe if we mix types because we will use the type info of the
847851 underlaying type in order to recreate it, in this example, a string
848852 */
853+ #if 0
849854 if (id == TYPE_PTR && impl_type != nullptr)
850855 {
851856 // TODO: This may be too tricky to implement because it is impossible to reconstruct the pointer from the type
852857 // easily, as C does not mantain the true memory layout, pointers can be arrays or single elements and we cannot know
853858 // We should review this carefully
854- #if 0
859+ #if 0
855860 /* Reconstruct the pointer value from the type info */
856861 c_loader_pointer_type *pointer_type = static_cast<c_loader_pointer_type *>(impl_type);
857862
858863 void *arg_value = pointer_type->to_value(value_to_ptr(c_function->values[args_count]));
859- #endif
864+ #endif
860865
861866 value_type_destroy(c_function->values[args_count]);
862867 }
863- else if (id == TYPE_STRING)
868+ else
869+ #endif
870+ if (id == TYPE_STRING)
864871 {
865872 /* Clear the pointer to string allocated before */
866873 value_type_destroy (c_function->values [args_count]);
0 commit comments