[D-runtime] dup attributes?
Sean Kelly
sean at invisibleduck.org
Thu Aug 5 16:14:16 PDT 2010
Yuck. Seems like dup should be consistent with the other functions, though it could go either way.
On Aug 4, 2010, at 5:32 AM, Steve Schveighoffer wrote:
> Currently, in the array runtime code, all appends and length settings copy the
> BlkAttr attributes from the existing block to the new block. This is important
> if you set block attributes other than the default, or you are appending to a
> block which is currently typed differently than what it was when allocated.
>
> However, the one function which does *not* do this is dup. dup uses the
> typeinfo to determine the block attributes, including the NO_SCAN flag.
>
> I think it should copy the attributes like all the other functions do. However,
> there is one caveat to this. Currently dup doesn't look up the block attributes
> of the existing data, because it doesn't have to. So changing dup to copy the
> attributes would slow down dup a bit because in addition to allocating a new
> block, it must look up the flags for the old block.
>
> What do you guys think?
>
> -Steve
>
>
>
>
> _______________________________________________
> D-runtime mailing list
> D-runtime at puremagic.com
> http://lists.puremagic.com/mailman/listinfo/d-runtime
More information about the D-runtime
mailing list