if i have this

typedef struct type1 {
  char8 a;
  char8 b;
  char8 c;
}

typedef struct _interface {
  type1 field1;
}interface;

and want to change to

typedef struct type1 {
  char8 d;
  char8 b;
  char8 c;
}

typedef struct _protocol {
  type1 *field1;
}interface;

interface *p

-p->field->a
+p->field->d

I have tried just changing field1 to field2. This gives parsing errors.

@@
typedef interface;
interface *p;
typedef type1;
type1 field1;
@@
<...
-p->field1
+p->fieldnew
...>

also, similar question. What if i want to change the type.

typedef struct _interface {
  type2 *field1;
}interface;

Thanks
_______________________________________________
Cocci mailing list
[email protected]
https://systeme.lip6.fr/mailman/listinfo/cocci

Reply via email to