From: Fonyuy-Asheri Caleb <fonyuy-asheri.caleb@inria.fr>
To: Julia Lawall <julia.lawall@inria.fr>
Cc: cocci <cocci@inria.fr>
Subject: Re: [cocci] Creating function definitions from function pointers in a struct with coccinelle
Date: Mon, 10 Feb 2025 15:54:50 +0100 (CET) [thread overview]
Message-ID: <1328834805.8860973.1739199290076.JavaMail.zimbra@inria.fr> (raw)
In-Reply-To: <6c99f67f-11ed-c3c1-948a-155e22667e24@inria.fr>
That was a mistake. Sorry about that.
I actually meant this
ctx->ops.my_function(id, data);
ctx->my_function(id, data);
with the intention of picking up my_function and the parameter list.
Caleb
> On Mon, 10 Feb 2025, Fonyuy-Asheri Caleb wrote:
>
>> Follow up question please:
>>
>> How can i match function pointer calls such as
>>
>> ctx->ops.my_function(int id, struct data_struct data);
>
> When you call a function, you don't put the types on the arguments. If
> you want to specify the types, you can make metavariables of a certain
> type like:
>
> @@
> int id;
> struct data_struct data;
> @@
>
> julia
>>
>> or
>>
>> ctx->my_function(int id, struct data_struct data);
>>
>> I can't seem to get this working.
>>
>>
>> Caleb
>>
>> ----- Original Message -----
>> > From: "Julia Lawall" <julia.lawall@inria.fr>
>> > To: "Fonyuy-Asheri Caleb" <fonyuy-asheri.caleb@inria.fr>
>> > Cc: "Julia Lawall" <julia.lawall@inria.fr>, "cocci" <cocci@inria.fr>
>> > Sent: Monday, February 10, 2025 12:56:20 PM
>> > Subject: Re: [cocci] Creating function definitions from function pointers in a
>> > struct with coccinelle
>>
>> > On Mon, 10 Feb 2025, Fonyuy-Asheri Caleb wrote:
>> >
>> >> Thanks a lot Julia.
>> >>
>> >> It works now.
>> >
>> > Excellent :)
>> >
>> > julia
>> >
next prev parent reply other threads:[~2025-02-10 14:54 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-02-10 11:08 [cocci] Creating function definitions from function pointers in a struct with coccinelle Fonyuy-Asheri Caleb
2025-02-10 11:16 ` Julia Lawall
2025-02-10 11:23 ` Fonyuy-Asheri Caleb
2025-02-10 11:32 ` Julia Lawall
2025-02-10 11:42 ` Fonyuy-Asheri Caleb
2025-02-10 11:56 ` Julia Lawall
2025-02-10 14:48 ` Fonyuy-Asheri Caleb
2025-02-10 14:52 ` Julia Lawall
2025-02-10 14:54 ` Fonyuy-Asheri Caleb [this message]
2025-02-10 15:00 ` Julia Lawall
2025-02-10 15:54 ` Markus Elfring
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=1328834805.8860973.1739199290076.JavaMail.zimbra@inria.fr \
--to=fonyuy-asheri.caleb@inria.fr \
--cc=cocci@inria.fr \
--cc=julia.lawall@inria.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.