From f2b9c373af9603b495950fffd7594daefe65a78f Mon Sep 17 00:00:00 2001 From: heck Date: Thu, 1 Jun 2023 14:59:29 +0200 Subject: [PATCH] positron review: fix ambiguity in "#Rules For Parameters Of Primitive-Type" MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit quote positron: "About primitive-type parameters, “The caller has to allocate memory for T”: I disagree. There is no memory to allocate. In fact those parameters can live their entire life in registers. On the other hand, the memory pointed by T* needs to be allocated by the caller." --- README.md | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index c5385cb..ee94be2 100644 --- a/README.md +++ b/README.md @@ -168,10 +168,14 @@ Where `T` any of the respective IDL-Types (not their respective c-type, as menti #### Rules For Parameters Of Primitive-Type -The caller has to allocate memory for `T`. -For mode `Update`, the callee is allowed to mutate the memory pointed to by `T*`. (1) A primitive-type cannot be consumed or produced because it's always statically allocated. +### Update + +The caller has to allocate memory for `T*`. +The callee is allowed to mutate the memory pointed to by `T*`. +The caller is responsible to free the memory pointed to by `T*`. + #### Rules For Parameters Of Object-Type ##### Read