eina_model: correctly retrieve the memory from value.
authorbarbieri <barbieri@7cbeb6ba-43b4-40fd-8cce-4c39aea84d33>
Wed, 8 Feb 2012 15:13:25 +0000 (15:13 +0000)
committerbarbieri <barbieri@7cbeb6ba-43b4-40fd-8cce-4c39aea84d33>
Wed, 8 Feb 2012 15:13:25 +0000 (15:13 +0000)
val->value.ptr is just valid on 64bits platforms, as on 32bits both
pointers of the Eina_Value_Struct fits in the 8bytes of val->value.buf.

Always use the function to correctly retrieve it.

git-svn-id: http://svn.enlightenment.org/svn/e/trunk/eina@67764 7cbeb6ba-43b4-40fd-8cce-4c39aea84d33

src/lib/eina_model.c

index fb7f9f7..621cb5a 100644 (file)
@@ -2544,7 +2544,7 @@ _eina_model_interface_properties_struct_private_get(const Eina_Model *model)
 {
    Eina_Value *val = eina_model_interface_private_data_get
      (model, EINA_MODEL_INTERFACE_PROPERTIES_STRUCT);
-   return val->value.ptr;
+   return eina_value_memory_get(val);
 }
 
 #define EINA_MODEL_INTERFACE_PROPERTIES_STRUCT_GET(model)         \