aboutsummaryrefslogtreecommitdiffstats
path: root/docs/contributing.rst
diff options
context:
space:
mode:
authorAlex Stapleton <alexs@prol.etari.at>2013-12-28 16:28:59 +0000
committerAlex Stapleton <alexs@prol.etari.at>2013-12-28 16:57:26 +0000
commit9020b4845a8667a2f400a0fb1b5138cb8d51eaca (patch)
tree234cd52a7dc6a13159512a7b5d59338f5f820117 /docs/contributing.rst
parentb50927e8dba16142205684ff9cdeab8b03d57b50 (diff)
downloadcryptography-9020b4845a8667a2f400a0fb1b5138cb8d51eaca.tar.gz
cryptography-9020b4845a8667a2f400a0fb1b5138cb8d51eaca.tar.bz2
cryptography-9020b4845a8667a2f400a0fb1b5138cb8d51eaca.zip
String literals are const char*.
GCC won't whine with -Wall because so much code isn't const correct but writing to a string literal is undefined. -Wwrite-strings is the warning flag to enable to spot these.
Diffstat (limited to 'docs/contributing.rst')
-rw-r--r--docs/contributing.rst12
1 files changed, 6 insertions, 6 deletions
diff --git a/docs/contributing.rst b/docs/contributing.rst
index 63c99530..657c4359 100644
--- a/docs/contributing.rst
+++ b/docs/contributing.rst
@@ -141,17 +141,17 @@ this:
.. code-block:: c
- #define SOME_INTEGER 0x0;
- #define SOME_UINTEGER (unsigned int)0x0001;
- #define SOME_STRING "hello";
+ #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;
- static const unsigned int SOME_UINTEGER;
- static char *const SOME_STRING;
+ static const int SOME_INTEGER_LITERAL;
+ static const unsigned int SOME_UNSIGNED_INTEGER_LITERAL;
+ static const char *const SOME_STRING_LITERAL;
Documentation
-------------