All of lore.kernel.org
 help / color / mirror / Atom feed
From: Anthony PERARD <anthony@xenproject.org>
To: Jan Beulich <jbeulich@suse.com>
Cc: "xen-devel@lists.xenproject.org" <xen-devel@lists.xenproject.org>,
	Anthony PERARD <anthony.perard@vates.tech>,
	Juergen Gross <jgross@suse.com>
Subject: Re: [PATCH] libxl/json: don't expose internal functions
Date: Thu, 27 Nov 2025 15:27:41 +0100	[thread overview]
Message-ID: <aShf3WFVns0StoGe@l14> (raw)
In-Reply-To: <1533aaa3-5065-4214-a920-191a8b174314@suse.com>

On Tue, Nov 25, 2025 at 10:11:21AM +0100, Jan Beulich wrote:
> Ideally internal function declarations wouldn't live in a non-private
> header. If already they need to, they should be hidden as much as
> possible. That is (a) their declarations shouldn't be exposed and (b) the
> symbols shouldn't appear in the shared library's dynamic symbol table.
> Gate the declarations upon _hidden actually being defined (rather than
> providing an empty fallback), and apply _hidden also to the libyail
> variants.

The YAJL functions needs to stay in the API, they've been exposed on
purpose in this header... The only user of those I know is `xl`. They
are limited since your application also needs to use libyajl. I think
I've butchered this header enough to make it complicated to use for
applications that are not `xl`.

libxl_json.h is only part of the header, there's a second part that is
automatically generated, _libxl_types_json.h.

While we could simply move the few prototype that uses json-c support
listed here to an actually private header, there's still the
autogenerated header to deal with. I feel like it would simpler to avoid
installing both headers (libxl_json.h and _libxl_types_json.h) when we
compile the tools with json-c. And even maybe add a fake "libxl_json.h"
which only have an "#error" saying the json helper aren't available
anymore.

Thanks,

-- 
Anthony PERARD


  reply	other threads:[~2025-11-27 14:28 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-11-25  9:11 [PATCH] libxl/json: don't expose internal functions Jan Beulich
2025-11-27 14:27 ` Anthony PERARD [this message]
2025-11-27 15:11   ` Jan Beulich

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=aShf3WFVns0StoGe@l14 \
    --to=anthony@xenproject.org \
    --cc=anthony.perard@vates.tech \
    --cc=jbeulich@suse.com \
    --cc=jgross@suse.com \
    --cc=xen-devel@lists.xenproject.org \
    /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.