Uh oh!
There was an error while loading. Please reload this page.
utf8 basics - #284
Conversation
marijnh
commented
Mar 25, 2011
Hi Graydon, The patches have been updated. I'd really rather not get into formatting discussions at this point, since we have plans to use the pretty-printer to make all that moot. Please accept my compressed one-liners until then. As for constants, adding a few of them did clarify things. I left the bitmasks as hex literals, since a constant named last_six_bits_set or so seems more indirect than 0x3f. Regarding the refcounting in str_push_byte... My first attempt would deref v when allocating a new one, and leave the ref as is in the other case. However, this led to double-free errors. My conclusion is that rust expects a refcounted value returned from a foreign call to be 'new', in that it already has a refcount bump (or was initialized with refcount 1). Thus, when returning a value that was an argument to the foreign call, you have to bump its refcount. I added a clearer comment about the rustboot workaround at https://github.com/marijnh/rust/blob/master/src/lib/_str.rs#L292 . Best, |
Finally implements _str.is_utf8, adds from_chars, from_char, to_chars, char_at, char_len, (push|pop|shift|unshift)_char. Also, proper character I/O for streams.
graydon
commented
Mar 25, 2011
Integrated (with rt/rustrt.def.in fix) |
Rust reorders fields, but miri uses the order from the source files
Added getloadavg for Linux, the BSDs and Solaris. Sadly Android's bionic lacks this functionality.
Change `Simd::splat` to not generate a loop
284: By default, log only to stderr, and not to disk. r=matklad a=eminence This fixes a common problem when running under VS Code, the user doesn't have permissions to create a `log` directory in the CWD. The old behavior can be re-enabled by setting `RA_INTERNAL_MODE=1` Fixesrust-lang#282 Co-authored-by: Andrew Chin <achin@eminence32.net>
I'd like you to double-check the function at https://github.com/marijnh/rust/commit/8b51e075c5de83d50e40a30872db6a051b12413c#L7R188 to see you spot any glaring mistakes.
(make check passes if i first back up far enough to start from a passing HEAD again)