summaryrefslogtreecommitdiff
path: root/README.Coding
diff options
context:
space:
mode:
authorGerald Carter <jerry@samba.org>2007-09-14 12:06:34 +0000
committerGerald (Jerry) Carter <jerry@samba.org>2007-10-10 12:30:46 -0500
commit2e30a025754c97b2fff9a0e9ab3923f2f01cfc11 (patch)
treef7695d01011c0cdb3613b26699cee1eaaf3b76ca /README.Coding
parent28aa4bff8d6be031c6089fe5c7ab010f1cc48340 (diff)
downloadsamba-2e30a025754c97b2fff9a0e9ab3923f2f01cfc11.tar.gz
r25156: Update coding guiding wrt to primitive data types
(This used to be commit 01d42744903d7ef9044fa4d2ad1cc64594717573)
Diffstat (limited to 'README.Coding')
-rw-r--r--README.Coding15
1 files changed, 15 insertions, 0 deletions
diff --git a/README.Coding b/README.Coding
index 73ceb5028cf..da6bb382078 100644
--- a/README.Coding
+++ b/README.Coding
@@ -214,3 +214,18 @@ or
if (!x) {
fprintf(stderr, "Unable to alloc memory!\n");
}
+
+
+Primitive Data Types
+--------------------
+
+Samba has large amounts of historical code which makes use of data types
+commonly supported by the C99 standard. However, at the time such types
+as boolean and exact width integers did not exist and Samba developers
+were forced to provide their own. Now that these types are guaranteed to
+be available either as part of the compiler C99 support or from lib/replace/,
+new code should adhere to the following conventions:
+
+ * Booleans are of type "bool" (not BOOL)
+ * Boolean values are "true" and "false" (not True or False)
+ * Exact width integers are of type [u]int[8|16|32|64]_t