Commit Graph

3 Commits

Author SHA1 Message Date
Dave Abrahams
c0f4b11b95 [stdlib] Don't expose uninitialized memory
...at least, not without the word "unsafe."  ManagedBuffer's create()
function takes a closure that creates an initial value for its "value"
property (which is technically computed but effectively stored).  Before
this change, the closure had access to that property before it was
initialized.  Now you can still get there, but you have to go through
"withUnsafeMutablePointer*" methods.

Swift SVN r22501
2014-10-03 21:30:00 +00:00
Dave Abrahams
65ec2cdb00 [stdlib] Minor ManagedBuffer cleanups
In preparation for gyb'ing; we'll need to inject different base classes
so we can use this for Array et. al.

Swift SVN r22500
2014-10-03 21:29:59 +00:00
Dave Abrahams
43deddf8ac [stdlib] Move ManagedBuffer prototype into stdlib
...in preparation to use it in _[Contiguous]ArrayBuffer

Swift SVN r22440
2014-10-01 21:12:43 +00:00