List for cgit developers and users
 help / color / mirror / Atom feed
From: e at 80x24.org (Eric Wong)
Subject: [RFC] use buffered stdio (lightly tested)
Date: Wed, 2 Jan 2019 09:16:16 +0000	[thread overview]
Message-ID: <20190102091616.GA1281@dcvr> (raw)
In-Reply-To: <20190101132303.23117-1-e@80x24.org>

> index 70f5b74..2c387c1 100644
> --- a/filter.c
> +++ b/filter.c
> @@ -143,22 +145,22 @@ void cgit_init_filters(void)
>  #endif
>  
>  #ifndef NO_LUA
> -static ssize_t (*libc_write)(int fd, const void *buf, size_t count);
> +static ssize_t (*libc_fwrite)(const void *buf, size_t size, size_t n, FILE *);

Oops, that should be size_t:

  static size_t (*libc_fwrite)(const void *buf, size_t size, size_t n, FILE *);

I also think we need to keep hooking write(2) in addition to
fwrite(3), since (I think) the Lua script may call write(2)
outside of the API we provide it.


  reply	other threads:[~2019-01-02  9:16 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-01-01 13:23 e
2019-01-02  9:16 ` e [this message]
2019-01-05 22:02 ` e

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20190102091616.GA1281@dcvr \
    --to=cgit@lists.zx2c4.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).