[Date Prev][Date Next][Thread Prev][Thread Next]
[Date Index]
[Thread Index]
- Subject: Re: Deep Copy prototype
- From: Luiz Henrique de Figueiredo <lhf@...>
- Date: Wed, 7 May 2003 16:50:27 -0300
>Thanks for the clarification. I meant to use:
>
>if T == "string" then return string.gsub( A, "(.*)", "%1")
Which still does not do what you want. It is not possible to produce 2
different copies of the same string in Lua.
>The string.gsub docs say: "Returns a copy of s in which..."
>But if there truly aren't string duplicates, help me understand what string.gsub is returning?
It's returning a string that has the same contents as the original one and
hence Lua forces it to be the same Lua value of type string.
--lhf