Re: Native style guide

2015-02-04 Thread Colin McCabe
There are two kinds of native code. We've been roughly following the Linux Kernel Coding style in the C code. Details here: https://www.kernel.org/doc/Documentation/CodingStyle The main exception is that we use 4 spaces for indentation, not hard tabs. For C++, there was a thread a while back abo

Re: Native style guide

2015-02-03 Thread Chris Nauroth
Hi Steve, I don't believe we have an official statement of the native code style, so that's something that would be beneficial. To address your immediate question, yes, it is acceptable to use goto in error checking logic to jump to a labeled cleanup routine. This is an established pattern throu

Native style guide

2015-02-03 Thread Steve Loughran
Do we have a native code style guide? Specifically, it is OK to use goto as a way of bailing out of things and into some memory release logic as part of some JNI exception generation routine? Don't worry, I'm asking on behalf of someone else -Steve ps: what I have been intermittently doing i