forked from enlightenment/efl
Eo dbg info: Add support for to_string.
SVN revision: 83481
This commit is contained in:
parent
324e84e307
commit
4b230bb164
|
@ -1618,6 +1618,27 @@ _eo_dbg_info_copy(const Eina_Value_Type *type EINA_UNUSED, const void *_src, voi
|
|||
return EINA_TRUE;
|
||||
}
|
||||
|
||||
static Eina_Bool
|
||||
_eo_dbg_info_convert_to(const Eina_Value_Type *type EINA_UNUSED, const Eina_Value_Type *convert, const void *type_mem, void *convert_mem)
|
||||
{
|
||||
/* FIXME: For the meanwhile, just use the inner type for the value. */
|
||||
const Eo_Dbg_Info **src = (const Eo_Dbg_Info **) type_mem;
|
||||
if (convert == EINA_VALUE_TYPE_STRINGSHARE ||
|
||||
convert == EINA_VALUE_TYPE_STRING)
|
||||
{
|
||||
Eina_Bool ret;
|
||||
const char *other_mem;
|
||||
char *inner_val = eina_value_to_string(&(*src)->value);
|
||||
other_mem = inner_val;
|
||||
ret = eina_value_type_pset(convert, convert_mem, &other_mem);
|
||||
free(inner_val);
|
||||
return ret;
|
||||
}
|
||||
|
||||
eina_error_set(EINA_ERROR_VALUE_FAILED);
|
||||
return EINA_FALSE;
|
||||
}
|
||||
|
||||
static Eina_Bool
|
||||
_eo_dbg_info_pset(const Eina_Value_Type *type EINA_UNUSED, void *_mem, const void *_ptr)
|
||||
{
|
||||
|
@ -1644,7 +1665,7 @@ static const Eina_Value_Type _EO_DBG_INFO_TYPE = {
|
|||
_eo_dbg_info_flush,
|
||||
_eo_dbg_info_copy,
|
||||
NULL,
|
||||
NULL,
|
||||
_eo_dbg_info_convert_to,
|
||||
NULL,
|
||||
NULL,
|
||||
_eo_dbg_info_pset,
|
||||
|
|
Loading…
Reference in New Issue