Re: [exim] dlfunc yield value protocol

Pàgina inicial
Delete this message
Reply to this message
Autor: Ian Zimmerman
Data:  
A: exim-users
Assumpte: Re: [exim] dlfunc yield value protocol
On 2019-01-24 14:10, Ian Zimmerman wrote:

> On 2019-01-24 20:44, Jeremy Harris wrote:
>
> > string_sprintf()
> > string_copy()
> > string_copyn()
>
> Exactly what I was hoping for! Thanks.


A follow-up question. Can I do the analogue of realloc()?

I am trying to construct a list (in the Exim sense) and return it from
the dlfunc module. I don't know a priori how long the list will be or
how many elements.

I could just allocate a new string as I add each new element but that
has quadratic behavior.

I guess I could store the elements in a linked list and then concatenate
them all at once, but that seems like too much work :-P

--
Please don't Cc: me privately on mailing lists and Usenet,
if you also post the followup to the list or newsgroup.
To reply privately _only_ on Usenet and on broken lists
which rewrite From, fetch the TXT record for no-use.mooo.com.