GRPC Core  9.0.0
GRPC C STYLE GUIDE

Background

Here we document style rules for C usage in the gRPC Core library.

General

Header Files

Variable Initialization

When declaring a (non-static) pointer variable, always initialize it to NULL. Even in the case of static pointer variables, it's recommended to explicitly initialize them to NULL.

C99 Features

Comments

Within public header files, only /* */ comments are allowed.

Within implementation files and private headers, either single line // or multi line /* */ comments are allowed. Only one comment style per file is allowed however (i.e. if single line comments are used anywhere within a file, ALL comments within that file must be single line comments).

Symbol Names

Functions