This is an automated email from the git hooks/post-receive script.
git pushed a commit to branch master
in repository efl.
View the commit online.
commit 90e22be0a480a416a9b804ea7d57517ea4238cd2
Author: Cedric BAIL <[email protected]>
AuthorDate: Tue Nov 10 21:26:36 2026 -0600
elementary: position_manager: callers zero the structs that grew
Size_Call_Config.no_fetch and Size_Batch_Result.estimate_version were
added to structs of a release that did not have them. Say in the docs
that a caller zero-initialises the config and a callback the result, and
make the one in-tree builder of a config do it.
Co-Authored-By: Claude Opus 5.5 <[email protected]>
---
src/lib/elementary/efl_ui_position_manager_common.h | 2 +-
.../elementary/efl_ui_position_manager_data_access_v1.eo | 14 ++++++++++++--
2 files changed, 13 insertions(+), 3 deletions(-)
diff --git a/src/lib/elementary/efl_ui_position_manager_common.h b/src/lib/elementary/efl_ui_position_manager_common.h
index fa84c53517..9bdc7e05ad 100644
--- a/src/lib/elementary/efl_ui_position_manager_common.h
+++ b/src/lib/elementary/efl_ui_position_manager_common.h
@@ -32,7 +32,7 @@ _batch_request_size_config(Api_Callbacks cb , int start_id, int end_id, int len,
slice.mem = data;
slice.len = len;
- Efl_Ui_Position_Manager_Size_Call_Config conf;
+ Efl_Ui_Position_Manager_Size_Call_Config conf = { 0 };
conf.cache_request = cache;
conf.no_fetch = no_fetch;
conf.range.start_id = start_id;
diff --git a/src/lib/elementary/efl_ui_position_manager_data_access_v1.eo b/src/lib/elementary/efl_ui_position_manager_data_access_v1.eo
index 8a1dd4b7dc..e4f106b9e5 100644
--- a/src/lib/elementary/efl_ui_position_manager_data_access_v1.eo
+++ b/src/lib/elementary/efl_ui_position_manager_data_access_v1.eo
@@ -28,7 +28,12 @@ struct @beta Efl.Ui.Position_Manager.Size_Batch_Entity{
}
struct @beta Efl.Ui.Position_Manager.Size_Batch_Result {
- [[Struct returned by the size access callback.]]
+ [[Struct returned by the size access callback.
+
+ A callback must zero-initialise it before it fills it in: the position
+ managers read @.estimated and @.estimate_version, which a callback written
+ before they existed does not know of.
+ ]]
parent_size : Eina.Size2D; [[The group size of the group where the first item is part of.]]
parent_depth : ubyte; [[The depth of the parent]]
filled_items : uint; [[The number of items that are filled into the slice.]]
@@ -47,7 +52,12 @@ struct @beta Efl.Ui.Position_Manager.Size_Batch_Result {
}
struct @beta Efl.Ui.Position_Manager.Size_Call_Config {
- [[Struct that is returned by the function callbacks.]]
+ [[Struct that is returned by the function callbacks.
+
+ The fields were added after the first release of this struct: a caller
+ must zero-initialise it (a designated initializer or memset) before it
+ sets the fields it means, so that one it does not know of is false.
+ ]]
range : Efl.Ui.Position_Manager.Request_Range; [[The range of items to fill into @.memory. The length of memory must
be bigger or equal to the requested items]]
// This struct does not contain a @.memory field.
--
To stop receiving notification emails like this one, please contact
the administrator of this repository.