aboutsummaryrefslogtreecommitdiffstats
path: root/docs/contributing.rst
diff options
context:
space:
mode:
authorAlex Gaynor <alex.gaynor@gmail.com>2013-12-30 21:07:00 -0800
committerAlex Gaynor <alex.gaynor@gmail.com>2013-12-30 21:07:00 -0800
commit937451ee2771960bdea1bb3414c07da07c2baa71 (patch)
tree5e1b4a03c75f6b93e4618c866874d3ff8729c667 /docs/contributing.rst
parentb9bc6c3e4c9b647de1a1a2dd852ab591e9a69b01 (diff)
parentfbd7ffcdcda0269a654ebf373d4ec5f1e6d6d3f4 (diff)
downloadcryptography-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.rst23
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
-------------