This is an automated email from the git hooks/post-receive script.
git pushed a commit to branch eolian/improvements
in repository efl.
View the commit online.
commit f6e7afdeab7e49ee17889754f2dfc22fd1aa086b
Author: [email protected] <[email protected]>
AuthorDate: Sun Nov 8 17:35:57 2026 -0600
evas: Efl.Canvas.Proxy.source is @nullable
A new proxy has no source: the getter returns o->cur->source, which is
NULL until a source is set, and the setter accepts NULL to clear it.
A typed binding treats object results as non-null unless Eolian
says @nullable, so the getter's result was wrongly typed. @nullable emits
nothing in the C headers.
A test reads the source on a new proxy, sets one, then clears it.
Co-Authored-By: Claude Sonnet 5.5 <[email protected]>
---
src/lib/evas/canvas/efl_canvas_proxy.eo | 3 ++-
src/tests/evas/evas_test_image.c | 27 +++++++++++++++++++++++++++
2 files changed, 29 insertions(+), 1 deletion(-)
diff --git a/src/lib/evas/canvas/efl_canvas_proxy.eo b/src/lib/evas/canvas/efl_canvas_proxy.eo
index edf54a7f0b..72451e1728 100644
--- a/src/lib/evas/canvas/efl_canvas_proxy.eo
+++ b/src/lib/evas/canvas/efl_canvas_proxy.eo
@@ -30,7 +30,8 @@ class @beta Efl.Canvas.Proxy extends Efl.Canvas.Image_Internal
}
get {}
values {
- src: Efl.Canvas.Object; [[Source object to use for the proxy.]]
+ src: Efl.Canvas.Object @nullable; [[Source object to use for the proxy.
+ $null before a source is set, and to remove it.]]
}
}
@property source_clip {
diff --git a/src/tests/evas/evas_test_image.c b/src/tests/evas/evas_test_image.c
index b34ed7c03f..7114bdfa23 100644
--- a/src/tests/evas/evas_test_image.c
+++ b/src/tests/evas/evas_test_image.c
@@ -1305,6 +1305,32 @@ EFL_START_TEST(evas_object_image_9patch)
}
EFL_END_TEST
+EFL_START_TEST(evas_object_image_proxy_source_null)
+{
+ Evas *e;
+ Evas_Object *obj, *proxy;
+
+ e = _setup_evas();
+ obj = evas_object_image_add(e);
+ proxy = efl_add(EFL_CANVAS_PROXY_CLASS, e);
+ fail_if(!proxy);
+
+ /* Efl.Canvas.Proxy.source is @nullable: nothing is set on a new proxy. */
+ ck_assert_ptr_eq(efl_canvas_proxy_source_get(proxy), NULL);
+
+ efl_canvas_proxy_source_set(proxy, obj);
+ ck_assert_ptr_eq(efl_canvas_proxy_source_get(proxy), obj);
+
+ /* ... and setting $null removes it again. */
+ efl_canvas_proxy_source_set(proxy, NULL);
+ ck_assert_ptr_eq(efl_canvas_proxy_source_get(proxy), NULL);
+
+ evas_object_del(proxy);
+ evas_object_del(obj);
+ evas_free(e);
+}
+EFL_END_TEST
+
EFL_START_TEST(evas_object_image_save_from_proxy)
{
Evas *e;
@@ -1420,6 +1446,7 @@ void evas_test_image_object(TCase *tc)
tcase_add_test(tc, evas_object_image_cached_data_comparision);
tcase_add_test(tc, evas_object_image_9patch);
tcase_add_test(tc, evas_object_image_save_from_proxy);
+ tcase_add_test(tc, evas_object_image_proxy_source_null);
tcase_add_test(tc, evas_object_image_load_head_skip);
}
--
To stop receiving notification emails like this one, please contact
the administrator of this repository.