I have written a MsgPack cmod. It operates directly on Stdio.Buffer internals. In order to make that work, I exposed a bit more of the internal API via modules/_Stdio/buffer.h. I would like to merge that into 8.1. Are there any objections or comments regarding a Stdio.Buffer C-API? The branch is arne/msgpack.
Arne
It looks good to me.
There might be some other functions that would be useful for external modules, but this looks like a good start.
One detail in the actual mpack code: In the encoder case for PIKE_T_OBJECT, perhaps it would be a good idea to support all the buffer classes, and not only Stdio.Buffer.
Basically, use get_memory_object_memory instead?
Yes, that makes sense. Except maybe for String.Buffer, which should end up as a string type. Will add that.
One other internal API which could be quite useful is the creation of subbuffers. At least for _this_ particular case.
On 11/23/15 20:00, Per Hedbor () @ Pike (-) developers forum wrote:
One detail in the actual mpack code: In the encoder case for PIKE_T_OBJECT, perhaps it would be a good idea to support all the buffer classes, and not only Stdio.Buffer.
Basically, use get_memory_object_memory instead?
pike-devel@lists.lysator.liu.se