mirror of
https://github.com/pmmp/ext-encoding.git
synced 2025-09-19 18:49:41 +00:00
Using zend_string for buffers was convenient and allowed multiple buffers to reference the same buffer, but in practice this was just slowing things down. Writers will now always copy memory when cloned, ensuring that every writer has full ownership of the memory in question. This eliminates the potential for a string to be shared, and we don't have to worry about zend interned strings or any of that jazz.