You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Functions like umf_memory_provider_ops_t *umfOsMemoryProviderOps(void); should return const ptr.
They return static struct which should not by modified. Otherwise user can do something like this
umf_memory_provider_ops_t *a = umfOsMemoryProviderOps(void);
a.free = myFree();
umfProviderCreate(a, /*...*/);
/*...*/
*b = umfOsMemoryProviderOps(void);
umfProviderCreate(b, /*...*/); // still free is modified.
This change require the change in users code. Unless they use auto, or they create provider in this way umfProviderCreate(umfOsMemoryProviderOps(), /*...*/);
The text was updated successfully, but these errors were encountered:
Functions like
umf_memory_provider_ops_t *umfOsMemoryProviderOps(void);
should return const ptr.They return static struct which should not by modified. Otherwise user can do something like this
This change require the change in users code. Unless they use
auto
, or they create provider in this wayumfProviderCreate(umfOsMemoryProviderOps(), /*...*/);
The text was updated successfully, but these errors were encountered: