You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
It is not possible to avoid copying data in your own implementation of
ExpandEmitter because there is no way to manually tune the refcounting on
objects. Example of what I would like:
- seek template
- retain the template
- execute template with as emitter my own emmiter X, emitter X collects all
data pointers in a struct iovec
- call writev to write all output data
- release the template
(This is to minimize the number of kernel calls)
A solution would be to return a small object which only function would be the
programmer can indicate explicitly that he is done with the template.
I have looked into it, but I don't know for certain if ctemplate generates
temporary strings (not from the template and not from the
datastructures/TemplateDictionaryInterface)), but otherwise a flag to indicate
it the pointer is temporary (and needs copy if needed outside of the scope of
that emitter function) in ExpandEmitter would be nice.
I'm willing to contribute, although a few pointers would be nice so I can
comply with the coding style, etc.
Original issue reported on code.google.com by [email protected] on 29 Jul 2012 at 3:22
The text was updated successfully, but these errors were encountered:
Original issue reported on code.google.com by
[email protected]
on 29 Jul 2012 at 3:22The text was updated successfully, but these errors were encountered: