From: wagi@monom.org (Daniel Wagner)
To: cocci@systeme.lip6.fr
Subject: [Cocci] gboolean -> bool conversion
Date: Thu, 11 Jul 2013 14:38:52 +0200 [thread overview]
Message-ID: <51DEA75C.10309@monom.org> (raw)
In-Reply-To: <alpine.DEB.2.02.1307111417120.2253@hadrien>
Hi Julia,
On 07/11/2013 02:17 PM, Julia Lawall wrote:
> Maybe the patch below will get rid of the already tagged token problem and
> allow you to get rid of the ++..
Thanks for the quick fix. Indeed, this fixes the 'already tagged'
problem. The result is now:
struct info {
- gboolean data;
+ bool data;
};
-static gboolean timer_cb(gpointer user_data)
+static bool timer_cb(gpointer user_data)
{
struct info *info = user_data;
- info->data = FALSE;
+ info->data = false;
return FALSE;
}
-static gboolean is_enabled(gboolean flag)
+static bool is_enabled(bool flag)
{
return !flag;
}
int main(int argc, char *argv[])
{
- gboolean b = TRUE;
- gboolean c, d;
- gboolean e = FALSE, g, f = TRUE;
- gboolean h = is_ensbled(b);
+ bool b = true;
+ bool c, d;
+ bool e = false, g, f = true;
+ bool h = is_ensbled(b);
struct info *info;
info = g_new0(struct info, 1);
- info->data = TRUE;
+ info->data = true;
g_timeout(delay, timer_cb, &info);
I am pondering if it would be possible to say
- gboolean
when != 'static gboolean func(gpointer)'
+ bool
cheers,
daniel
ps: I the install step didn't work for me:
$ make install
cp: cannot create regular file ?ocaml/coccilib/coccilib.cmi?: No such
file or directory
make: *** [ocaml/coccilib/coccilib.cmi] Error 1
Doing a mkdir before the install step fixed it for me.
$ mkdir ocaml/coccili
$ make install
next prev parent reply other threads:[~2013-07-11 12:38 UTC|newest]
Thread overview: 20+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-07-11 8:17 [Cocci] gboolean -> bool conversion Daniel Wagner
2013-07-11 8:29 ` Julia Lawall
2013-07-11 9:07 ` Daniel Wagner
2013-07-11 9:57 ` Julia Lawall
2013-07-11 9:58 ` Daniel Wagner
2013-07-11 10:24 ` Julia Lawall
2013-07-11 11:17 ` Daniel Wagner
2013-07-11 12:17 ` Julia Lawall
2013-07-11 12:38 ` Daniel Wagner [this message]
2013-07-11 13:07 ` Julia Lawall
2013-07-12 6:55 ` Daniel Wagner
2013-07-12 7:00 ` Julia Lawall
2013-07-12 9:08 ` Daniel Wagner
2013-07-16 14:21 ` Daniel Wagner
2013-07-16 16:22 ` Julia Lawall
2013-07-17 8:47 ` Daniel Wagner
2013-07-17 9:01 ` Julia Lawall
2013-07-17 14:58 ` Daniel Wagner
2013-07-17 15:11 ` Julia Lawall
2013-07-17 15:40 ` Daniel Wagner
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=51DEA75C.10309@monom.org \
--to=wagi@monom.org \
--cc=cocci@systeme.lip6.fr \
/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.