On 10/10/2013 05:11, Marvin Humphrey wrote:
On Sat, Sep 14, 2013 at 12:29 PM,  <[email protected]> wrote:
      inert incremented String*
-    new_steal_str(char *ptr, size_t size);
+    new_steal_str(const char *ptr, size_t size);

It seems to me that the "steal" constructors should take `char*` instead of
`const char*`.  We have to cast away constness in the destructor when we
invoke "free" on the stolen strings, right?  The potential exists to create a
situation where we free() non-heap memory and the compiler doesn't issue a
warning.

You're right. Good catch.

Nick

Reply via email to