This is an automated email from the git hooks/post-receive script.
git pushed a commit to branch eo-api-finalize
in repository ego.
View the commit online.
commit 966e5abbd8c389663ef54a279dfed4bb251c4334
Author: Cedric Bail <[email protected]>
AuthorDate: Thu Nov 26 00:45:51 2026 -0600
efl: comments in object.go and event.go sit on what they describe
The comment of efl_del was merged into the one of _ego_efl_detach, the
one of delEoObject sat on detachEoObject and the one of eflEventDelDesc
on eflEventInvalidateDesc. MainLoop's said what was missing before it
existed rather than what it is for.
Co-Authored-By: Claude Fable 5.2 <[email protected]>
---
efl/event.go | 6 +++---
efl/object.go | 14 ++++++--------
2 files changed, 9 insertions(+), 11 deletions(-)
diff --git a/efl/event.go b/efl/event.go
index 2748eef1..78352b6e 100644
--- a/efl/event.go
+++ b/efl/event.go
@@ -147,9 +147,9 @@ func (h *handler) detach() {
)
}
-// eflEventDelDesc returns the EFL_EVENT_DEL event description pointer as an
-// unsafe.Pointer. Used by tests that need to register against EFL_EVENT_DEL
-// without importing cgo directly.
+// eflEventInvalidateDesc and eflEventDelDesc return the descriptions of
+// EFL_EVENT_INVALIDATE and EFL_EVENT_DEL, for code and tests that register
+// on them without cgo of their own.
func eflEventInvalidateDesc() unsafe.Pointer {
return unsafe.Pointer(C.EFL_EVENT_INVALIDATE)
}
diff --git a/efl/object.go b/efl/object.go
index 56d7c688..a03b77a9 100644
--- a/efl/object.go
+++ b/efl/object.go
@@ -28,9 +28,6 @@ static const char *_ego_efl_class_name(const Eo *obj) {
return efl_class_name_get(obj);
}
-// _ego_efl_del unrefs obj and reparents it to NULL, which causes EFL to emit
-// EFL_EVENT_DEL once the object's reference count reaches zero.
-// efl_del is a real EO_API function, not a macro.
// _ego_efl_detach takes obj off its parent, which is how an object EFL owns
// is deleted: the parent's reference goes with it, and the object is
// invalidated now and freed once nobody else holds it.
@@ -458,9 +455,8 @@ func wrapObject(ptr unsafe.Pointer) *Object {
// MainLoop returns the process's main loop.
//
// Anything extending Efl.Loop_Consumer -- an Efl.Exe, an Efl.Io.Copier, a
-// timer -- has to be parented to something that provides a loop, and until
-// this existed there was no way to name one from Go without first creating a
-// window. The loop belongs to the process, not to the caller: the returned
+// timer -- has to be parented to something that provides a loop, and this
+// is one that needs no window. The loop belongs to the process, not to the caller: the returned
// Object is borrowed and must not be unreferenced.
//
// It is only valid between Init and Shutdown.
@@ -686,8 +682,7 @@ func newEoObject() unsafe.Pointer {
return unsafe.Pointer(C._ego_new_object())
}
-// delEoObject calls efl_del on the raw Eo pointer, which unrefs the object and
-// reparents it to NULL, triggering EFL_EVENT_DEL once its refcount hits zero.
+// detachEoObject takes the object off its parent, as Del does, for tests.
// Must be called on the EFL thread.
func detachEoObject(ptr unsafe.Pointer) {
C._ego_efl_detach((*C.Eo)(ptr))
@@ -697,6 +692,9 @@ func eoRefCount(ptr unsafe.Pointer) int {
return int(C._ego_efl_ref_count((*C.Eo)(ptr)))
}
+// delEoObject calls efl_del on the raw Eo pointer, which unrefs the object and
+// reparents it to NULL, triggering EFL_EVENT_DEL once its refcount hits zero.
+// Must be called on the EFL thread.
func delEoObject(ptr unsafe.Pointer) {
C._ego_efl_del((*C.Eo)(ptr))
}
--
To stop receiving notification emails like this one, please contact
the administrator of this repository.