linux-sparse.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Luc Van Oostenryck <luc.vanoostenryck@gmail.com>
To: Randy Dunlap <rdunlap@infradead.org>
Cc: Linux-Sparse <linux-sparse@vger.kernel.org>
Subject: Re: symbol.h question
Date: Mon, 22 Jan 2018 06:56:25 +0100	[thread overview]
Message-ID: <20180122055624.wgzfr2noac2nxnfg@ltop.local> (raw)
In-Reply-To: <16508b89-ae1d-eb2d-4df3-ecbf243c2f47@infradead.org>

On Sun, Jan 21, 2018 at 09:41:25PM -0800, Randy Dunlap wrote:
> Hi,
> 
> What is the purpose/meaning of these inline + extern in symbol.h?
> 
> static inline int is_ptr_type(struct symbol *type)
> {
> 	if (type->type == SYM_NODE)
> 		type = type->ctype.base_type;
> 	return type->type == SYM_PTR || type->type == SYM_ARRAY || type->type == SYM_FN;
> }

It's now a misnomer. It's purpose now is to check if the type
is a pointer or can degenerate to a pointer.
A better name should be used.
 
> ///later:
> 
> extern int is_ptr_type(struct symbol *);

This must be removed (cfr. https://github.com/lucvoo/sparse/commit/46047a0706e5 )

Regards,
-- Luc 

  reply	other threads:[~2018-01-22  5:56 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-01-22  5:41 symbol.h question Randy Dunlap
2018-01-22  5:56 ` Luc Van Oostenryck [this message]
2018-01-22  9:15 ` Dan Carpenter

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=20180122055624.wgzfr2noac2nxnfg@ltop.local \
    --to=luc.vanoostenryck@gmail.com \
    --cc=linux-sparse@vger.kernel.org \
    --cc=rdunlap@infradead.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 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).