[Issue 13348] std.uni.Grapheme is impure due to using C malloc and friends
via Digitalmars-d-bugs
digitalmars-d-bugs at puremagic.com
Thu Jun 2 09:05:06 PDT 2016
https://issues.dlang.org/show_bug.cgi?id=13348
Steven Schveighoffer <schveiguy at yahoo.com> changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |dmitry.olsh at gmail.com
Summary|std.uni.byGrapheme is |std.uni.Grapheme is impure
|impure |due to using C malloc and
| |friends
--- Comment #6 from Steven Schveighoffer <schveiguy at yahoo.com> ---
OK, so pretty much all the problems stem from malloc/realloc/free being used to
manage the memory of the Grapheme type.
There is one obvious fix: isRegionalIndicator can be marked pure nothrow.
we could move the allocation scheme to use the GC instead of C malloc. But I
don't know what this does for performance. As the comments say, most uses will
never use the allocation.
CC Dmitry.
--
More information about the Digitalmars-d-bugs
mailing list