From: Dan Carpenter <dan.carpenter@oracle.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 12:15:00 +0300 [thread overview]
Message-ID: <20180122091500.qfawmwbqkqig64h2@mwanda> (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;
> }
>
> ///later:
>
> extern int is_ptr_type(struct symbol *);
>
It takes a symbol pointer and tells you if the symbol represents a
pointer (or array or a function since those are basically pointers too).
regards,
dan carpenter
prev parent reply other threads:[~2018-01-22 9:15 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
2018-01-22 9:15 ` Dan Carpenter [this message]
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=20180122091500.qfawmwbqkqig64h2@mwanda \
--to=dan.carpenter@oracle.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).