> Hence, func_new() reduces the number of arguments to just one > -- a format string, and variadic arguments.
* Does this wording contain a contradiction? * Would you like to fiddle with any more variadic functions? > My question is how would I go about trying to get coccinelle to help me > translate this? Is this even possible? Generally, yes. A more complete source code transformation approach can become challenging. > @@ > expression O1, O2, O3 > @@ > > - func_old(O1, O2, O3, ...); Can it be that the item “charstring” would contain multiple expressions? If you would like to reuse the last function parameters, the passed code should be stored into corresponding metavariables of a type like “constant” or “expression list”. https://github.com/coccinelle/coccinelle/blob/7cf2c23e64066d5249a64a316cc5347831f7a63f/docs/manual/cocci_syntax.tex#L199 > + func_new("%s: ...", __func__, O3); > > I suspect I might be stretching coccinelle's abilities in trying to craft > new parameters, but I thought I'd ask. I imagine that the clarification of corresponding application details can become more interesting. Regards, Markus _______________________________________________ Cocci mailing list [email protected] https://systeme.lip6.fr/mailman/listinfo/cocci
