[Mesa-dev] Unify the style of function pointer calls in structs

Boyan Ding boyan.j.ding at gmail.com
Tue Nov 24 21:27:01 PST 2015


This series is a follow-up of Brian's patch ([1], commit 47fae842). It
converts nearly all of the function-pointer-in-a-struct calls from
  (*foo->bar)(...) or (foo->bar)(...)
to
  foo->bar(...)

The sed regex to do the conversion looks like this (really ugly):
  s/(\*\?\([^*(), \]]*->[^*), \]]*\))(/\1(/
It doesn't affect pointer-to-member operation in C++ (the parenthesis
there can't be omitted).

This series didn't touch the gtest directory since it seems to be an
external project. If people think it is also necessary to apply
conversion there, I can send the patch for it.

I compile-tested the series and it builds okay.

Boyan Ding

[1] http://lists.freedesktop.org/archives/mesa-dev/2015-November/101007.html


More information about the mesa-dev mailing list