[INTERPRETER]

* NEW: You can convert a pointer to a static structure now. It is useful 
  when an extern function has a 'struct XXX **' argument.


git-svn-id: svn://localhost/gambas/trunk@4974 867c0c6c-44f3-4631-809d-bfa615b0a4ec
This commit is contained in:
Benoît Minisini 2012-07-21 11:16:57 +00:00
parent 1c96e1dd0d
commit 4f8389e766

View file

@ -754,10 +754,22 @@ __OBJECT:
{
if (value->type == T_NULL)
{
OBJECT_null(value, (CLASS *)type); /* marche aussi pour type = T_OBJECT */
OBJECT_null(value, (CLASS *)type); // Also works if type == T_OBJECT
goto __TYPE;
}
if (value->type == T_POINTER)
{
class = (CLASS *)type;
if (CLASS_is_struct(class))
{
value->_object.object = CSTRUCT_create_static(STRUCT_CONST, class, value->_pointer.value);
goto __TYPE;
}
}
if (value->type == T_VARIANT)
goto __v2;