aboutsummaryrefslogtreecommitdiffstats
path: root/docs/contributing.rst
diff options
context:
space:
mode:
authorPaul Kehrer <paul.l.kehrer@gmail.com>2013-12-27 20:25:06 -0600
committerPaul Kehrer <paul.l.kehrer@gmail.com>2013-12-27 20:25:06 -0600
commitccd9c0069f6955e8325ec63853e4609241cbea06 (patch)
tree5e4967ac17585125a6b43b6c1d08355551ffc08a /docs/contributing.rst
parent28f10001a18c96649003c59beb458d8d865aac88 (diff)
downloadcryptography-ccd9c0069f6955e8325ec63853e4609241cbea06.tar.gz
cryptography-ccd9c0069f6955e8325ec63853e4609241cbea06.tar.bz2
cryptography-ccd9c0069f6955e8325ec63853e4609241cbea06.zip
Convert #defines to explicit type declaration for consistency
Diffstat (limited to 'docs/contributing.rst')
-rw-r--r--docs/contributing.rst17
1 files changed, 17 insertions, 0 deletions
diff --git a/docs/contributing.rst b/docs/contributing.rst
index 139f7f3b..336d2acb 100644
--- a/docs/contributing.rst
+++ b/docs/contributing.rst
@@ -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 0x0;
+ #define SOME_UINTEGER (unsigned int)0x0001;
+ #define SOME_STRING "hello";
+
+...it should be added to the bindings like so:
+
+.. code-block:: c
+
+ static const int SOME_INTEGER;
+ static const unsigned int SOME_UINTEGER;
+ static char *const SOME_STRING;
+
Documentation
-------------