aboutsummaryrefslogtreecommitdiffhomepage
path: root/doc/c-style-guide.md
diff options
context:
space:
mode:
authorGravatar David Garcia Quintas <dgq@google.com>2016-07-15 08:05:07 -0700
committerGravatar David Garcia Quintas <dgq@google.com>2016-07-15 08:05:07 -0700
commitfb81858c96772ef2c9f64997a13ba4b8a3356bfd (patch)
treeae655c956a8afe1c29347da52306162e25d09104 /doc/c-style-guide.md
parentfed3e3b0705c2af5ba66f2c81366e05f07a9a937 (diff)
Forbade atexit()
Diffstat (limited to 'doc/c-style-guide.md')
-rw-r--r--doc/c-style-guide.md24
1 files changed, 16 insertions, 8 deletions
diff --git a/doc/c-style-guide.md b/doc/c-style-guide.md
index 517f60a219..369bd56a46 100644
--- a/doc/c-style-guide.md
+++ b/doc/c-style-guide.md
@@ -17,7 +17,7 @@ Header Files
------------
- Public header files (those in the include/grpc tree) should compile as
- pedantic C89
+ pedantic C89.
- Public header files should be includable from C++ programs. That is, they
should include the following:
```c
@@ -52,10 +52,10 @@ initialize them to `NULL`.
C99 Features
------------
-- Variable sized arrays are not allowed
-- Do not use the 'inline' keyword
+- Variable sized arrays are not allowed.
+- Do not use the 'inline' keyword.
- Flexible array members are allowed
- (https://en.wikipedia.org/wiki/Flexible_array_member)
+ (https://en.wikipedia.org/wiki/Flexible_array_member).
Comments
--------
@@ -70,7 +70,15 @@ ALL comments within that file must be single line comments).
Symbol Names
------------
-- Non-static functions must be prefixed by grpc_
-- static functions must not be prefixed by grpc_
-- enumeration values and #define names are uppercased, all others are lowercased
-- Multiple word identifiers use underscore as a delimiter (NEVER camel casing)
+- Non-static functions must be prefixed by `grpc_`
+- Static functions must *not* be prefixed by `grpc_`
+- Enumeration values and `#define` names must be uppercase. All other values
+ must be lowercase.
+- Multiple word identifiers use underscore as a delimiter, *never* camel
+ case. E.g. `variable_name`.
+
+Functions
+----------
+
+- The use of [`atexit()`](http://man7.org/linux/man-pages/man3/atexit.3.html) is
+ in forbidden in libgrpc.