mirror of
https://github.com/c3lang/c3c.git
synced 2026-02-27 12:01:16 +00:00
Improve contract for readline. #2280
This commit is contained in:
@@ -50,7 +50,8 @@ faultdef
|
||||
"\r" will be filtered from the String.
|
||||
|
||||
@param stream : `The stream to read from.`
|
||||
@require @is_instream(stream) : `The stream must implement InStream.`
|
||||
@require !($defined(&stream) &&& @is_instream(&stream)) : "The value for 'stream' should have been passed as a pointer and not as a value, please add '&'."
|
||||
@require @is_instream(stream) : `Make sure that the stream is actually an InStream.`
|
||||
@param [inout] allocator : `the allocator to use.`
|
||||
@return `The string containing the data read.`
|
||||
*>
|
||||
@@ -94,6 +95,7 @@ macro String? readline(Allocator allocator, stream = io::stdin())
|
||||
on the temporary allocator and does not need to be freed.
|
||||
|
||||
@param stream : `The stream to read from.`
|
||||
@require !($defined(&stream) &&& @is_instream(&stream)) : "The value for 'stream' should have been passed as a pointer and not as a value, please add '&'."
|
||||
@require @is_instream(stream) : `The stream must implement InStream.`
|
||||
@return `The temporary string containing the data read.`
|
||||
*>
|
||||
|
||||
@@ -33,8 +33,10 @@
|
||||
- Fixes to thread local pointer handling.
|
||||
- Fixes to JSON parsing and Object.
|
||||
- Array indices are now using int64 internally.
|
||||
- Bit shift operation fails with inline uint enum despite matching underlying type #2279.
|
||||
|
||||
### Stdlib changes
|
||||
- Improve contract for readline. #2280
|
||||
|
||||
## 0.7.3 Change list
|
||||
|
||||
|
||||
Reference in New Issue
Block a user