[m-rev.] for review: read Mercury files using read_file_as_string
Zoltan Somogyi
zoltan.somogyi at runbox.com
Sat Jul 27 17:54:26 AEST 2019
On Sat, 27 Jul 2019 17:47:23 +1000 (AEST), Julien Fischer <jfischer at opturion.com> wrote:
> I don't think the less accurate error message is significant; the
> compiler doesn't pass that test in non-C grades anyway. (Because the
> target languages are fine with null chars in strings.)
Ok, thanks.
> > The second is that the speedup could be slightly higher if read_file_as_string
> > returned the max offset in the string it returns, which it has to know in order to
> > allocate the right amount of memory. While I could write a new variant of
> > the C version of read_file_as_string that does that, maybe called read_file_as_
> > string_and_length,
>
> Don't use length, since that's ambiguous.
What would you suggest? I presume "size" would also be ambiguous.
> The diff looks fine otherwise.
Thanks; I will follow your suggestions.
Zoltan.
More information about the reviews
mailing list