All of lore.kernel.org
 help / color / mirror / Atom feed
From: Petr Machata <petrm@nvidia.com>
To: Roi Dayan <roid@nvidia.com>
Cc: <netdev@vger.kernel.org>, David Ahern <dsahern@gmail.com>,
	Petr Machata <me@pmachata.org>
Subject: Re: [PATCH iproute2] build: Fix link errors on some systems
Date: Wed, 6 Jan 2021 15:24:21 +0100	[thread overview]
Message-ID: <87turuuoru.fsf@nvidia.com> (raw)
In-Reply-To: <5ed38f17-be13-0c5b-5b2f-1cb58ee77a8c@nvidia.com>


Roi Dayan <roid@nvidia.com> writes:

> On 2021-01-06 3:16 PM, Petr Machata wrote:
>> Regarding the publishing, the _jw reference can be changed to a call to
>> is_json_context(), which does the same thing. Then _jw can stay private
>> in json_print.c.
>> Exposing an _IS_JSON_CONTEXT / _IS_FP_CONTEXT might be odd on account of
>> the initial underscore, but since it's only used in implementations,
>> maybe it's OK?
>> 
>
> With is_json_context() I cannot check the type passed by the caller.
> i.e. PRINT_JSON, PRINT_FP, PRINT_ANY.

I meant s/_jw/is_json_context()/. Like this:

#define _IS_JSON_CONTEXT(type) \
    ((type & PRINT_JSON || type & PRINT_ANY) && is_json_context())

Then _jw can stay private.

  reply	other threads:[~2021-01-06 14:25 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-12-30 19:11 [PATCH iproute2] build: Fix link errors on some systems Roi Dayan
2021-01-04 16:07 ` Petr Machata
2021-01-06  8:42   ` Roi Dayan
2021-01-06 12:51     ` Roi Dayan
2021-01-06 13:16       ` Petr Machata
2021-01-06 14:20         ` Roi Dayan
2021-01-06 14:24           ` Petr Machata [this message]
2021-01-07  6:52             ` Roi Dayan
2021-01-06 16:00     ` Stephen Hemminger
2021-01-06 16:08       ` Petr Machata

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=87turuuoru.fsf@nvidia.com \
    --to=petrm@nvidia.com \
    --cc=dsahern@gmail.com \
    --cc=me@pmachata.org \
    --cc=netdev@vger.kernel.org \
    --cc=roid@nvidia.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.