@@ -1742,50 +1742,6 @@ bool MCScriptBytecodeIterate(byte_t*& x_bytecode, byte_t *p_bytecode_limit, MCSc
17421742 return true ;
17431743}
17441744
1745- static bool MCScriptMapValueToType (MCValueRef p_value, MCResolvedTypeInfo& p_input_type, MCResolvedTypeInfo& p_output_type, MCValueRef& r_transformed)
1746- {
1747- bool t_success;
1748- t_success = true ;
1749-
1750- if (MCTypeInfoIsForeign (p_input_type . type))
1751- {
1752- if (MCTypeInfoIsForeign (p_output_type . type))
1753- {
1754- // Both foreign and conform, which means they are compatible.
1755- r_transformed = p_value;
1756- }
1757- else
1758- {
1759- // Input foreign, output not foreign - need to import.
1760- const MCForeignTypeDescriptor *t_descriptor;
1761- t_descriptor = MCForeignTypeInfoGetDescriptor (p_input_type . type);
1762- // If the doimport method is nil, then there is no bridge, so we just
1763- // propagate the type itself.
1764- if (t_descriptor -> doimport == nil)
1765- r_transformed = p_value;
1766- else if (!t_descriptor -> doimport (MCForeignValueGetContentsPtr (p_value), false , r_transformed))
1767- t_success = false ;
1768- }
1769- }
1770- else
1771- {
1772- if (MCTypeInfoIsForeign (p_output_type . type))
1773- {
1774- // Input not foreign, output foreign so need to export.
1775- if (!MCForeignValueExport (p_output_type . named_type, p_value, (MCForeignValueRef&)r_transformed))
1776- t_success = false ;
1777- }
1778- else
1779- {
1780- // Input is not foreign, output is not foreign so they must be
1781- // compatible.
1782- r_transformed = p_value;
1783- }
1784- }
1785-
1786- return t_success;
1787- }
1788-
17891745bool MCScriptCallHandlerOfInstanceInternal (MCScriptInstanceRef self, MCScriptHandlerDefinition *p_handler, MCValueRef *p_arguments, uindex_t p_argument_count, MCValueRef& r_value)
17901746{
17911747 // As this method is called internally, we can be sure that the arguments conform
0 commit comments