Code review comment for lp:~jpakkane/unity-scopes-api/visibility

Revision history for this message
Jussi Pakkanen (jpakkane) wrote :

Also: it is considered dubious practice to have inline methods in your headers even in plain C. An alternative to removing those symbols from the symbols file is to make sure we don't have any compiler generated methods in our public classes. Basically it would mean going from this:

class Foo {
  Foo(bar) { ... }
};

Into this:

class Foo {
  Foo(bar);
};

and then in the cpp file have:

Foo::Foo(bar) {
}

This would mean that we can change the implementation of this constuctor/destructor/etc without breaking ABI.

I started doing this already but then decided that removing the symbols from the file would be simpler. Thinking about it this explicit declaration would probably be the better solution overall.

« Back to merge proposal