Branch: Tag:


2014-10-01 14:38:48 by Martin Nilsson <>

Stdio.IOBuffer -> Stdio.Buffer (part 2)

2014-10-01 14:34:26 by Martin Nilsson <>

Stdio.IOBuffer -> Stdio.Buffer (part 1)


2014-09-08 12:30:17 by Per Hedbor <>

Some IOBuffer work

o Made all (I think) functions atomic. Either they work or they do
nothing (except throw an error or return 0).

o One minor optimization to avoid copies when strings/system.memory
object etc are added to an empty buffer. Unless you add more data
the buffer is just moved to point to the object that was just added.
The malloced buffer is still kept around, however.

o Added a very very basic testsuite for IOBuffer. More to come.


2014-09-04 15:57:43 by Arne Goedeke <>

Merge remote-tracking branch 'origin/8.0' into string_alloc



2014-09-03 18:30:32 by Per Hedbor <>

Added buffered asynchronous I/O mode to Stdio.File

In this mode the input and output is kept in buffers in the file object.
Adding data to the output buffer will write it to the filedescriptor, and
the read callback will receive the input buffer as its argument.

The write callback will have the output buffer as a second argument,
but most of the time this can be ignored since you keep the buffer
object around.

The write callback will only be called if the buffer needs more data,
so if you implement a range_error function in the buffer that refills
the buffer it will only be called once that callback returns 0.


2014-09-02 13:05:49 by Per Hedbor <>

Some tweaks to Stdio.IOBuffer:

o The various functions that add data now return the buffer
o It is now possible to overload the range_error method.
This can be used to fill the buffer on demand.


2014-09-01 16:52:12 by Per Hedbor <>

Some changes to Stdio.IOBuffer:

o Set error mode now accepts a program to throw on error
o Relaxed argument types (for now)

2014-09-01 15:19:37 by Per Hedbor <>

Added some more functionality to Stdio.IOBuffer

o input_from(file), output_to(file) -- async or sync file-IO.
o add and crete now supports the other buffer objects


2014-08-28 12:03:12 by Per Hedbor <>

Moved __builtin.IOBuffer to Stdio.IOBuffer (for now)