[geany/geany] fd38a4: Add note about data types to HACKING

Matthew Brush git-noreply at xxxxx
Fri Aug 4 09:09:45 UTC 2017

Branch:      refs/heads/master
Author:      Matthew Brush <matt at geany.org>
Committer:   Matthew Brush <mbrush at codebrainz.ca>
Date:        Fri, 04 Aug 2017 09:09:45 UTC
Commit:      fd38a49b55d7a4bfdb98069ac3bc839bf49d803b

Log Message:
Add note about data types to HACKING

Closes #1282

Modified Paths:

Modified: HACKING
5 lines changed, 5 insertions(+), 0 deletions(-)
@@ -214,6 +214,11 @@ Coding
   to will not be mutated within the function.
 * Don't let variable names shadow outer variables - use gcc's -Wshadow
+* Use the strictest possible data type where practical. For example
+  for an enumeration, use the actual enum type rather than just a
+  ``gint``, use a ``gchar`` for individual (ASCII/UTF-8) string
+  characters rather than ``gint``, and use a ``guint`` for integers
+  which cannot be negative rather than ``gint``.
 * Do not use G_LIKELY or G_UNLIKELY (except in critical loops). These
   add noise to the code with little real benefit.

This E-Mail was brought to you by github_commit_mail.py (Source: https://github.com/geany/infrastructure).

More information about the Commits mailing list