[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:
parent
1c96e1dd0d
commit
4f8389e766
1 changed files with 13 additions and 1 deletions
|
@ -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;
|
||||
|
||||
|
|
Loading…
Reference in a new issue