Added the possibility to obtain buffers (copied from buffers)
This commit is contained in:
parent
fd788fc9df
commit
67b23de717
|
@ -338,6 +338,7 @@ int variable_get_as(Variable * variable, VariableType type, void * result)
|
||||||
uint16_t u16;
|
uint16_t u16;
|
||||||
int32_t i32;
|
int32_t i32;
|
||||||
uint32_t u32;
|
uint32_t u32;
|
||||||
|
Buffer ** b;
|
||||||
|
|
||||||
switch(type)
|
switch(type)
|
||||||
{
|
{
|
||||||
|
@ -504,6 +505,13 @@ int variable_get_as(Variable * variable, VariableType type, void * result)
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
case VT_BUFFER:
|
case VT_BUFFER:
|
||||||
|
if(variable->type == VT_BUFFER)
|
||||||
|
{
|
||||||
|
b = result;
|
||||||
|
*b = buffer_new_copy(variable->u.buffer);
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
break;
|
||||||
case VT_STRING:
|
case VT_STRING:
|
||||||
/* FIXME implement */
|
/* FIXME implement */
|
||||||
break;
|
break;
|
||||||
|
|
Loading…
Reference in New Issue
Block a user