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 c1890f00564ce2019e89beeb058aa3b249bad7b9
Author: [email protected] <[email protected]>
AuthorDate: Thu Oct 29 22:47:06 2026 -0600

    ecore: Io properties that are construction only say so
    
    Efl.Io.Buffered_Stream.inner_io, Efl.Io.File flags and mode, and
    Efl.Composite_Model.index only make sense before the object is
    finalized, and were guarded by hand-written finalize checks. They are
    now @construct_only and use the generated guard instead.
    
    Buffered_Stream now keeps max_queue_size_input/output until the queues
    exist, so a value given in efl_add before inner_io is no longer
    dropped.
    
    The documentation of max_queue_size_*, Efl.Io.Buffer.limit,
    Efl.Io.Queue.limit and Efl.Io.Copier source/destination now says why
    they stay changeable: the queue limits work at runtime and servers set
    them on accepted clients, and Copier restarts on purpose.
    
    Co-Authored-By: Claude Opus 5.5 <[email protected]>
---
 src/lib/ecore/efl_composite_model.eo    |  4 ++--
 src/lib/ecore/efl_io_buffered_stream.c  | 21 ++++++++++++++++-----
 src/lib/ecore/efl_io_buffered_stream.eo | 20 +++++++++++++++++---
 src/lib/ecore/efl_io_copier.eo          |  4 ++--
 src/lib/ecore/efl_io_file.c             |  5 +----
 src/lib/ecore/efl_io_file.eo            | 13 ++++++++-----
 src/lib/efl/interfaces/efl_io_buffer.eo |  5 ++++-
 src/lib/efl/interfaces/efl_io_queue.eo  |  5 ++++-
 8 files changed, 54 insertions(+), 23 deletions(-)

diff --git a/src/lib/ecore/efl_composite_model.eo b/src/lib/ecore/efl_composite_model.eo
index 1f7b790fbe..8e8517af3d 100644
--- a/src/lib/ecore/efl_composite_model.eo
+++ b/src/lib/ecore/efl_composite_model.eo
@@ -10,7 +10,7 @@ class Efl.Composite_Model extends Efl.Loop_Model implements Efl.Ui.View
       @property index {
          [[Position of this object in the parent model.
 
-           It can only be set before the object is finalized but after the Model it composes is set
+           It must be set after the Model it composes is set
            (and only if that Model does not provide an index already).
            It can only be retrieved after the object has been finalized.
          ]]
@@ -36,7 +36,7 @@ class Efl.Composite_Model extends Efl.Loop_Model implements Efl.Ui.View
       Efl.Model.child_del;
    }
    constructors {
-      .index @optional;
+      .index @optional @construct_only;
       Efl.Ui.View.model;
    }
 }
diff --git a/src/lib/ecore/efl_io_buffered_stream.c b/src/lib/ecore/efl_io_buffered_stream.c
index 77e0ccd145..218c45b0d2 100644
--- a/src/lib/ecore/efl_io_buffered_stream.c
+++ b/src/lib/ecore/efl_io_buffered_stream.c
@@ -16,6 +16,10 @@ typedef struct
    Eo *outgoing;
    Eo *sender;
    Eo *receiver;
+   size_t max_queue_size_input; /* kept until the queue exists */
+   size_t max_queue_size_output;
+   Eina_Bool has_max_queue_size_input;
+   Eina_Bool has_max_queue_size_output;
    Eina_Bool is_closing;
    Eina_Bool closed;
    Eina_Bool eos;
@@ -347,7 +351,6 @@ _efl_io_buffered_stream_inner_io_set(Eo *o, Efl_Io_Buffered_Stream_Data *pd, Efl
 {
    Eina_Bool is_reader, is_writer;
 
-   EINA_SAFETY_ON_TRUE_RETURN(efl_finalized_get(o));
    EINA_SAFETY_ON_NULL_RETURN(io);
    EINA_SAFETY_ON_TRUE_RETURN(pd->inner_io != NULL);
 
@@ -368,6 +371,8 @@ _efl_io_buffered_stream_inner_io_set(Eo *o, Efl_Io_Buffered_Stream_Data *pd, Efl
                                efl_name_set(efl_added, "incoming"),
                                efl_event_callback_array_add(efl_added, _efl_io_buffered_stream_incoming_cbs(), o));
         EINA_SAFETY_ON_NULL_RETURN(pd->incoming);
+        if (pd->has_max_queue_size_input)
+          efl_io_queue_limit_set(pd->incoming, pd->max_queue_size_input);
 
         pd->receiver = efl_add(EFL_IO_COPIER_CLASS, o,
                                efl_name_set(efl_added, "receiver"),
@@ -393,6 +398,8 @@ _efl_io_buffered_stream_inner_io_set(Eo *o, Efl_Io_Buffered_Stream_Data *pd, Efl
                                efl_name_set(efl_added, "outgoing"),
                                efl_event_callback_array_add(efl_added, _efl_io_buffered_stream_outgoing_cbs(), o));
         EINA_SAFETY_ON_NULL_RETURN(pd->outgoing);
+        if (pd->has_max_queue_size_output)
+          efl_io_queue_limit_set(pd->outgoing, pd->max_queue_size_output);
 
         pd->sender = efl_add(EFL_IO_COPIER_CLASS, o,
                              efl_name_set(efl_added, "sender"),
@@ -416,9 +423,11 @@ _efl_io_buffered_stream_inner_io_get(const Eo *o EINA_UNUSED, Efl_Io_Buffered_St
 EOLIAN static void
 _efl_io_buffered_stream_max_queue_size_input_set(Eo *o EINA_UNUSED, Efl_Io_Buffered_Stream_Data *pd, size_t max_queue_size_input)
 {
+   pd->max_queue_size_input = max_queue_size_input;
+   pd->has_max_queue_size_input = EINA_TRUE;
    if (!pd->incoming)
      {
-        DBG("%p inner_io=%p (%s) is not Efl.Io.Reader, limit=%zu ignored", o, pd->inner_io, efl_class_name_get(efl_class_get(pd->inner_io)), max_queue_size_input);
+        DBG("%p inner_io=%p has no incoming queue (yet), limit=%zu kept for when there is one", o, pd->inner_io, max_queue_size_input);
         return;
      }
    efl_io_queue_limit_set(pd->incoming, max_queue_size_input);
@@ -427,16 +436,18 @@ _efl_io_buffered_stream_max_queue_size_input_set(Eo *o EINA_UNUSED, Efl_Io_Buffe
 EOLIAN static size_t
 _efl_io_buffered_stream_max_queue_size_input_get(const Eo *o EINA_UNUSED, Efl_Io_Buffered_Stream_Data *pd)
 {
-   if (!pd->incoming) return 0;
+   if (!pd->incoming) return pd->max_queue_size_input;
    return efl_io_queue_limit_get(pd->incoming);
 }
 
 EOLIAN static void
 _efl_io_buffered_stream_max_queue_size_output_set(Eo *o EINA_UNUSED, Efl_Io_Buffered_Stream_Data *pd, size_t max_queue_size_output)
 {
+   pd->max_queue_size_output = max_queue_size_output;
+   pd->has_max_queue_size_output = EINA_TRUE;
    if (!pd->outgoing)
      {
-        DBG("%p inner_io=%p (%s) is not Efl.Io.Writer, limit=%zu ignored", o, pd->inner_io, efl_class_name_get(efl_class_get(pd->inner_io)), max_queue_size_output);
+        DBG("%p inner_io=%p has no outgoing queue (yet), limit=%zu kept for when there is one", o, pd->inner_io, max_queue_size_output);
         return;
      }
    efl_io_queue_limit_set(pd->outgoing, max_queue_size_output);
@@ -445,7 +456,7 @@ _efl_io_buffered_stream_max_queue_size_output_set(Eo *o EINA_UNUSED, Efl_Io_Buff
 EOLIAN static size_t
 _efl_io_buffered_stream_max_queue_size_output_get(const Eo *o EINA_UNUSED, Efl_Io_Buffered_Stream_Data *pd)
 {
-   if (!pd->outgoing) return 0;
+   if (!pd->outgoing) return pd->max_queue_size_output;
    return efl_io_queue_limit_get(pd->outgoing);
 }
 
diff --git a/src/lib/ecore/efl_io_buffered_stream.eo b/src/lib/ecore/efl_io_buffered_stream.eo
index 44a511abe5..4a3fcba0a0 100644
--- a/src/lib/ecore/efl_io_buffered_stream.eo
+++ b/src/lib/ecore/efl_io_buffered_stream.eo
@@ -40,7 +40,7 @@ class @beta Efl.Io.Buffered_Stream extends Efl.Loop_Consumer implements Efl.Io.R
                 [[The internal input/output used for actual operations. Use with care!]]
             }
             set {
-                [[Constructor-only property to set the inner_io.]]
+                [[Sets the inner_io.]]
             }
             values {
                 io: Efl.Object @nullable; [[The input (@Efl.Io.Reader) or output (@Efl.Io.Writer) instance. Can be $null.]]
@@ -53,10 +53,15 @@ class @beta Efl.Io.Buffered_Stream extends Efl.Loop_Consumer implements Efl.Io.R
               If limited and @.line_delimiter is set, "line" events
               may be emitted with partial contents without the
               trailing delimiter.
+
+              It may be changed at any time. Lowering it below what is
+              already queued drops the data beyond the new limit. A value
+              given before @.inner_io is kept and applied once the queue
+              exists, which it only does if the inner I/O is a reader.
             ]]
             get { }
             set {
-                [[Constructor-only property to set buffer limit. 0 is unlimited]]
+                [[Sets the buffer limit. 0 is unlimited.]]
             }
             values {
                 max_queue_size_input: size; [[Defines a maximum buffer size for incoming data or 0 to allow an
@@ -69,10 +74,15 @@ class @beta Efl.Io.Buffered_Stream extends Efl.Loop_Consumer implements Efl.Io.R
 
 
               If limited @Efl.Io.Writer.write will take less data than requested.
+
+              It may be changed at any time. Lowering it below what is
+              already queued drops the data beyond the new limit. A value
+              given before @.inner_io is kept and applied once the queue
+              exists, which it only does if the inner I/O is a writer.
             ]]
             get { }
             set {
-                [[Constructor-only property to set buffer limit. 0 is unlimited]]
+                [[Sets the buffer limit. 0 is unlimited.]]
             }
             values {
                 max_queue_size_output: size; [[Defines a maximum buffer size for output data, or 0 to allow unlimited
@@ -253,6 +263,10 @@ class @beta Efl.Io.Buffered_Stream extends Efl.Loop_Consumer implements Efl.Io.R
                                         Note that the line slice may not be inside @.slice.]]
     }
 
+    constructors {
+        .inner_io @optional @construct_only;
+    }
+
     implements {
         Efl.Object.finalize;
         Efl.Object.invalidate;
diff --git a/src/lib/ecore/efl_io_copier.eo b/src/lib/ecore/efl_io_copier.eo
index 94e633e77b..86a327d676 100644
--- a/src/lib/ecore/efl_io_copier.eo
+++ b/src/lib/ecore/efl_io_copier.eo
@@ -117,7 +117,7 @@ class @beta Efl.Io.Copier extends Efl.Loop_Consumer implements Efl.Io.Closer {
            get {
            }
            set {
-                [[Constructor-only property to set where to read data from]]
+                [[Sets where to read data from. Normally given at construction; setting it later starts the copy as finalize would.]]
            }
            values {
                 source: Efl.Io.Reader @nullable; [[@Efl.Io.Reader source. Can be $null.]]
@@ -176,7 +176,7 @@ class @beta Efl.Io.Copier extends Efl.Loop_Consumer implements Efl.Io.Closer {
            get {
            }
            set {
-                [[Constructor-only property to set where to write data to]]
+                [[Sets where to write data to. Normally given at construction; setting it later starts the copy as finalize would.]]
            }
            values {
                 destination: Efl.Io.Writer @nullable; [[@Efl.Io.Writer destination. Can be $null.]]
diff --git a/src/lib/ecore/efl_io_file.c b/src/lib/ecore/efl_io_file.c
index 041db19e95..99d956ae46 100644
--- a/src/lib/ecore/efl_io_file.c
+++ b/src/lib/ecore/efl_io_file.c
@@ -75,8 +75,6 @@ _efl_io_file_flags_set(Eo *o, Efl_Io_File_Data *pd, uint32_t flags)
 {
    Eina_Bool close_on_exec;
 
-   EINA_SAFETY_ON_TRUE_RETURN(efl_finalized_get(o));
-
    pd->flags = flags;
 
    close_on_exec = !!(flags & O_CLOEXEC);
@@ -91,9 +89,8 @@ _efl_io_file_flags_get(const Eo *o EINA_UNUSED, Efl_Io_File_Data *pd)
 }
 
 EOLIAN static void
-_efl_io_file_mode_set(Eo *o, Efl_Io_File_Data *pd, uint32_t mode)
+_efl_io_file_mode_set(Eo *o EINA_UNUSED, Efl_Io_File_Data *pd, uint32_t mode)
 {
-   EINA_SAFETY_ON_TRUE_RETURN(efl_finalized_get(o));
    pd->mode = mode;
 }
 
diff --git a/src/lib/ecore/efl_io_file.eo b/src/lib/ecore/efl_io_file.eo
index 5bf2c23e9f..c68c8e6602 100644
--- a/src/lib/ecore/efl_io_file.eo
+++ b/src/lib/ecore/efl_io_file.eo
@@ -15,15 +15,13 @@ class @beta Efl.Io.File extends Efl.Loop_Fd
               Defaults to O_RDONLY | O_CLOEXEC.
 
               The flag O_CLOEXEC will be also managed by
-              @Efl.Io.Closer.close_on_exec.set. Setting the property
-              after the file is opened will change its blocking
-              behavior.
+              @Efl.Io.Closer.close_on_exec.set.
             ]]
             get {
             }
 
             set {
-               [[Constructor property to define flags to open the file]]
+               [[Defines the flags to open the file.]]
             }
 
             values {
@@ -37,7 +35,7 @@ class @beta Efl.Io.File extends Efl.Loop_Fd
             }
 
             set {
-               [[Constructor property to define mode to open the file]]
+               [[Defines the mode to open the file.]]
             }
 
             values {
@@ -46,6 +44,11 @@ class @beta Efl.Io.File extends Efl.Loop_Fd
         }
     }
 
+    constructors {
+        .flags @optional @construct_only;
+        .mode @optional @construct_only;
+    }
+
     implements {
         Efl.Object.constructor;
         Efl.Object.destructor;
diff --git a/src/lib/efl/interfaces/efl_io_buffer.eo b/src/lib/efl/interfaces/efl_io_buffer.eo
index 58e0c7ab22..9c18999a7c 100644
--- a/src/lib/efl/interfaces/efl_io_buffer.eo
+++ b/src/lib/efl/interfaces/efl_io_buffer.eo
@@ -62,10 +62,13 @@ class @beta Efl.Io.Buffer extends Efl.Object
 
               If you want a buffer of an exact size always set the
               limit before any further calls that can expand it.
+
+              It may be changed at any time. Lowering it below what the
+              buffer holds drops the data beyond the new limit.
             ]]
             get { }
             set {
-                [[Constructor-only property to set buffer limit. 0 is unlimited]]
+                [[Sets the buffer limit. 0 is unlimited.]]
             }
             values {
                 size: size; [[Defines a maximum buffer size, or 0 to allow unlimited amount of bytes]]
diff --git a/src/lib/efl/interfaces/efl_io_queue.eo b/src/lib/efl/interfaces/efl_io_queue.eo
index 0da629b7bc..571d77f5f4 100644
--- a/src/lib/efl/interfaces/efl_io_queue.eo
+++ b/src/lib/efl/interfaces/efl_io_queue.eo
@@ -25,10 +25,13 @@ class @beta Efl.Io.Queue extends Efl.Object implements Efl.Io.Reader, Efl.Io.Wri
 
               If you want a buffer of an exact size, always set the
               limit before any further calls that can expand it.
+
+              It may be changed at any time. Lowering it below what is
+              queued drops the data beyond the new limit.
             ]]
             get { }
             set {
-                [[Constructor-only property to set buffer limit. 0 is unlimited]]
+                [[Sets the buffer limit. 0 is unlimited.]]
             }
             values {
                 size: size; [[Defines a maximum buffer size, or 0 to allow unlimited amount of bytes]]

-- 
To stop receiving notification emails like this one, please contact
the administrator of this repository.

Reply via email to