Commit 56dea32f authored by Diego Biurrun's avatar Diego Biurrun

doc: developer: Fix wording in "naming conventions" section

parent 69dca3a4
...@@ -178,27 +178,26 @@ GCC statement expressions (@samp{(x = (@{ int y = 4; y; @})}). ...@@ -178,27 +178,26 @@ GCC statement expressions (@samp{(x = (@{ int y = 4; y; @})}).
@end itemize @end itemize
@subsection Naming conventions @subsection Naming conventions
All names are using underscores (_), not CamelCase. For example, All names should be composed with underscores (_), not CamelCase. For example,
@samp{avfilter_get_video_buffer} is a valid function name and @samp{avfilter_get_video_buffer} is an acceptable function name and
@samp{AVFilterGetVideo} is not. The only exception from this are structure @samp{AVFilterGetVideo} is not. The only exception are structure
names; they should always be in the CamelCase names; they should always be CamelCase.
There are following conventions for naming variables and functions: There are the following conventions for naming variables and functions:
@itemize @bullet @itemize @bullet
@item @item
For local variables no prefix is required. For local variables no prefix is required.
@item @item
For variables and functions declared as @code{static} no prefixes are required. For variables and functions declared as @code{static} no prefix is required.
@item @item
For variables and functions used internally by the library, @code{ff_} prefix For variables and functions used internally by a library an @code{ff_}
should be used. prefix should be used, e.g. @samp{ff_w64_demuxer}.
For example, @samp{ff_w64_demuxer}.
@item @item
For variables and functions used internally across multiple libraries, use For variables and functions used internally across multiple libraries, use
@code{avpriv_}. For example, @samp{avpriv_aac_parse_header}. @code{avpriv_}. For example, @samp{avpriv_aac_parse_header}.
@item @item
For exported names, each library has its own prefixes. Just check the existing For externally visible symbols, each library has its own prefix. Check
code and name accordingly. the existing code and choose names accordingly.
@end itemize @end itemize
@subsection Miscellaneous conventions @subsection Miscellaneous conventions
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment