gnucash unstable: Multiple changes pushed

Aaron Laws dartme18 at gmail.com
Fri Dec 29 12:08:32 EST 2017


On Fri, Dec 29, 2017 at 12:06 PM, Aaron Laws <dartme18 at gmail.com> wrote:

> Ok, that's a good motivation. Just to be clear for me, having a function
>> static is different from having a static variable, right ? As I
>> understand it
>> the latter is bad for thread safety, the former only ensures its local
>> scope.
>
>
> There two "static"s to keep in mind: static storage duration, and members
> not bound to instances. Static functions are functions that can't be used
> outside the current code file:
>
> static void func () { printf ("can't be used outside " __FILE__); }
> (or something like that.)
>
> I should have also said that this first type of static can be applied to
variables, too!

static int my_int; // can only be used in this translation unit: __FILE__.

I hope I answered your question and didn't add confusion!


More information about the gnucash-devel mailing list