diff options
author | Alex Gaynor <alex.gaynor@gmail.com> | 2013-12-30 21:07:00 -0800 |
---|---|---|
committer | Alex Gaynor <alex.gaynor@gmail.com> | 2013-12-30 21:07:00 -0800 |
commit | 937451ee2771960bdea1bb3414c07da07c2baa71 (patch) | |
tree | 5e1b4a03c75f6b93e4618c866874d3ff8729c667 /docs/contributing.rst | |
parent | b9bc6c3e4c9b647de1a1a2dd852ab591e9a69b01 (diff) | |
parent | fbd7ffcdcda0269a654ebf373d4ec5f1e6d6d3f4 (diff) | |
download | cryptography-937451ee2771960bdea1bb3414c07da07c2baa71.tar.gz cryptography-937451ee2771960bdea1bb3414c07da07c2baa71.tar.bz2 cryptography-937451ee2771960bdea1bb3414c07da07c2baa71.zip |
Merge branch 'master' into fernet
Diffstat (limited to 'docs/contributing.rst')
-rw-r--r-- | docs/contributing.rst | 23 |
1 files changed, 20 insertions, 3 deletions
diff --git a/docs/contributing.rst b/docs/contributing.rst index 620e1b6a..657c4359 100644 --- a/docs/contributing.rst +++ b/docs/contributing.rst @@ -110,14 +110,14 @@ Don't name parameters: ...; }; -Don't include stray ``void`` parameters: +Include ``void`` if the function takes no arguments: .. code-block:: c // Good - long f(); - // Bad long f(void); + // Bad + long f(); Wrap lines at 80 characters like so: @@ -136,6 +136,23 @@ Include a space after commas between parameters: // Bad long f(int,char *) +Values set by ``#define`` should be assigned the appropriate type. If you see +this: + +.. code-block:: c + + #define SOME_INTEGER_LITERAL 0x0; + #define SOME_UNSIGNED_INTEGER_LITERAL 0x0001U; + #define SOME_STRING_LITERAL "hello"; + +...it should be added to the bindings like so: + +.. code-block:: c + + static const int SOME_INTEGER_LITERAL; + static const unsigned int SOME_UNSIGNED_INTEGER_LITERAL; + static const char *const SOME_STRING_LITERAL; + Documentation ------------- |