All of lore.kernel.org
 help / color / mirror / Atom feed
* [Cocci] how to add a few decalrations
@ 2014-09-11 12:16 picca at synchrotron-soleil.fr
  2014-09-11 13:04 ` [Cocci] How to add a few declarations? SF Markus Elfring
  2014-09-11 13:34 ` [Cocci] how to add a few decalrations Julia Lawall
  0 siblings, 2 replies; 21+ messages in thread
From: picca at synchrotron-soleil.fr @ 2014-09-11 12:16 UTC (permalink / raw)
  To: cocci

Hello,

first a big thanks for this fantastic tool... I am not kidding and this is not 'pour ?tre bien vu'.

So here I am trying to do something like that

@@
identifier self, unit_type, error, f;
@@

f(...){
...
+ unsigned int n_values = darray_size(hkl_geometry_axes_names_get(self));
+ double values[n_values];
...
-hkl_geometry_set_values_v(self, unit_type, &error, ...)
+hkl_geometry_axes_values_set(self, values, n_values, unit_type, &error)
...
}


So the idea is to replace a method by another one but to be able to do that, I need to add two new variables n_values and values.

Indeed when I try this spatch, I got this kind of error

picca at ORD03037:~/Projets/hkl/scripts$ ./refactoring geometry.cocci ../tests/*.c
init_defs_builtins: /usr/share/coccinelle/standard.h
190 193
Fatal error: exception Failure("minus: parse error: 
 = File "geometry.cocci", line 11, column 0,  charpos = 190
    around = '...', whole content = ...
")
../tests/hkl3d-test-t.c, ../tests/hkl-axis-t.c


I do not understand what's going on, but I am ready to learn with your help.

thanks a lot

Fr?d?ric

^ permalink raw reply	[flat|nested] 21+ messages in thread

end of thread, other threads:[~2014-09-12  9:17 UTC | newest]

Thread overview: 21+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-09-11 12:16 [Cocci] how to add a few decalrations picca at synchrotron-soleil.fr
2014-09-11 13:04 ` [Cocci] How to add a few declarations? SF Markus Elfring
2014-09-11 13:16   ` picca at synchrotron-soleil.fr
2014-09-11 13:37     ` Julia Lawall
2014-09-11 13:34 ` [Cocci] how to add a few decalrations Julia Lawall
2014-09-11 13:45   ` picca at synchrotron-soleil.fr
2014-09-11 13:51     ` Julia Lawall
2014-09-11 14:03       ` picca at synchrotron-soleil.fr
2014-09-11 14:13         ` picca at synchrotron-soleil.fr
2014-09-11 14:16           ` Julia Lawall
2014-09-11 14:27             ` picca at synchrotron-soleil.fr
2014-09-11 14:34               ` Julia Lawall
2014-09-11 14:51                 ` picca at synchrotron-soleil.fr
2014-09-11 18:34                   ` Julia Lawall
2014-09-12  8:21                   ` [Cocci] How to add a few declarations? SF Markus Elfring
2014-09-12  8:40                     ` picca at synchrotron-soleil.fr
2014-09-12  8:43                       ` Julia Lawall
2014-09-12  8:59                         ` picca at synchrotron-soleil.fr
2014-09-12  9:10                           ` Julia Lawall
2014-09-12  9:17                             ` picca at synchrotron-soleil.fr
2014-09-12  9:00                       ` [Cocci] Transformations around variadic functions SF Markus Elfring

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.