Repository: lucy-clownfish
Updated Branches:
  refs/heads/master a8f14c2db -> 4aea9977c


Fix stack string documentation

I forgot that we removed special handling of stack strings in DECREF.


Project: http://git-wip-us.apache.org/repos/asf/lucy-clownfish/repo
Commit: http://git-wip-us.apache.org/repos/asf/lucy-clownfish/commit/5c6d7402
Tree: http://git-wip-us.apache.org/repos/asf/lucy-clownfish/tree/5c6d7402
Diff: http://git-wip-us.apache.org/repos/asf/lucy-clownfish/diff/5c6d7402

Branch: refs/heads/master
Commit: 5c6d7402ec7c53b9ef0a2ae79f21ad677e549323
Parents: 2a44a5b
Author: Nick Wellnhofer <wellnho...@aevum.de>
Authored: Fri Feb 17 13:19:54 2017 +0100
Committer: Nick Wellnhofer <wellnho...@aevum.de>
Committed: Fri Feb 17 13:21:53 2017 +0100

----------------------------------------------------------------------
 runtime/core/Clownfish/String.cfh | 10 +++++-----
 1 file changed, 5 insertions(+), 5 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/lucy-clownfish/blob/5c6d7402/runtime/core/Clownfish/String.cfh
----------------------------------------------------------------------
diff --git a/runtime/core/Clownfish/String.cfh 
b/runtime/core/Clownfish/String.cfh
index 20841b2..0c5f04e 100644
--- a/runtime/core/Clownfish/String.cfh
+++ b/runtime/core/Clownfish/String.cfh
@@ -157,12 +157,12 @@ public final class Clownfish::String nickname Str
      * in `const char *ptr`.
      *
      * The UTF-8 data is not checked for validity. The memory pointed to
-     * by `ptr` must stay unchanged for the lifetime of the stack string,
-     * especially when passed as `decremented` argument. It's not required
-     * to release stack strings with `DECREF`, making them practical to be
-     * used with string literals:
+     * by `ptr` must stay unchanged for the lifetime of the stack string.
+     * Stack strings must never be released with `DECREF` and they must
+     * not be passed as decremented arguments. They're typically used
+     * with string literals:
      *
-     *     Vec_Push(vec, SSTR_WRAP_C("element"));
+     *     String *s = SSTR_WRAP_C("text");
      *
      * Calling `INCREF` on a stack string returns a heap-allocated copy of
      * the string as a separate object, making it crucial to always store

Reply via email to