From ee4fc69e6be57447f9c1d836248815b95e973542 Mon Sep 17 00:00:00 2001 From: Kevin Day Date: Mon, 25 Nov 2024 23:53:05 -0600 Subject: [PATCH] Update: Improved documentation comments in f_memory functions. I sometimes forget whether or not which type the "width" should be. This adds additional documentation to hopefully make it more clear. --- level_0/f_memory/c/memory/array.h | 35 +++++++++++++++++++++++++++++++++++ level_0/f_memory/c/memory/arrays.h | 12 ++++++++++++ 2 files changed, 47 insertions(+) diff --git a/level_0/f_memory/c/memory/array.h b/level_0/f_memory/c/memory/array.h index 876b92e..2f5cc4e 100644 --- a/level_0/f_memory/c/memory/array.h +++ b/level_0/f_memory/c/memory/array.h @@ -28,6 +28,11 @@ extern "C" { * The size of the structure represented by array. * The word "width" is used due to conflicts of already using "length" and "size". * + * This size represents the array type and not an inner types. + * For example, f_stringss_dynamic_t has an array of f_strings_dynamic_t. + * This size would be sizeof(f_strings_dynamic_t). + * This would neither be a size of (f_char_t) nor would it be a size of f_strings_dynamicss_t. + * * Must not be 0. * @param array * The structure.array to resize. @@ -67,6 +72,11 @@ extern "C" { * The size of the structure represented by array. * The word "width" is used due to conflicts of already using "length" and "size". * + * This size represents the array type and not an inner types. + * For example, f_stringss_dynamic_t has an array of f_strings_dynamic_t. + * This size would be sizeof(f_strings_dynamic_t). + * This would neither be a size of (f_char_t) nor would it be a size of f_strings_dynamicss_t. + * * Must not be 0. * @param array * The structure.array destination. @@ -189,6 +199,11 @@ extern "C" { * The size of the structure represented by array. * The word "width" is used due to conflicts of already using "length" and "size". * + * This size represents the array type and not an inner types. + * For example, f_stringss_dynamic_t has an array of f_strings_dynamic_t. + * This size would be sizeof(f_strings_dynamic_t). + * This would neither be a size of (f_char_t) nor would it be a size of f_strings_dynamicss_t. + * * Must not be 0. * @param array * The structure.array to resize. @@ -229,6 +244,11 @@ extern "C" { * The size of the structure represented by array. * The word "width" is used due to conflicts of already using "length" and "size". * + * This size represents the array type and not an inner types. + * For example, f_stringss_dynamic_t has an array of f_strings_dynamic_t. + * This size would be sizeof(f_strings_dynamic_t). + * This would neither be a size of (f_char_t) nor would it be a size of f_strings_dynamicss_t. + * * Must not be 0. * @param array * The structure.array to resize. @@ -267,6 +287,11 @@ extern "C" { * The size of the structure represented by array. * The word "width" is used due to conflicts of already using "length" and "size". * + * This size represents the array type and not an inner types. + * For example, f_stringss_dynamic_t has an array of f_strings_dynamic_t. + * This size would be sizeof(f_strings_dynamic_t). + * This would neither be a size of (f_char_t) nor would it be a size of f_strings_dynamicss_t. + * * Must not be 0. * @param array * The structure.array to resize. @@ -307,6 +332,11 @@ extern "C" { * The size of the structure represented by array. * The word "width" is used due to conflicts of already using "length" and "size". * + * This size represents the array type and not an inner types. + * For example, f_stringss_dynamic_t has an array of f_strings_dynamic_t. + * This size would be sizeof(f_strings_dynamic_t). + * This would neither be a size of (f_char_t) nor would it be a size of f_strings_dynamicss_t. + * * Must not be 0. * @param array * The structure.array to resize. @@ -345,6 +375,11 @@ extern "C" { * The size of the structure represented by array. * The word "width" is used due to conflicts of already using "length" and "size". * + * This size represents the array type and not an inner types. + * For example, f_stringss_dynamic_t has an array of f_strings_dynamic_t. + * This size would be sizeof(f_strings_dynamic_t). + * This would neither be a size of (f_char_t) nor would it be a size of f_strings_dynamicss_t. + * * Must not be 0. * @param array * The structure.array to resize. diff --git a/level_0/f_memory/c/memory/arrays.h b/level_0/f_memory/c/memory/arrays.h index 4ecac14..89a4b89 100644 --- a/level_0/f_memory/c/memory/arrays.h +++ b/level_0/f_memory/c/memory/arrays.h @@ -31,6 +31,12 @@ extern "C" { * @param width * The size of the structure represented by array. * The word "width" is used due to conflicts of already using "length" and "size". + * + * This size represents the array type and not an inner types. + * For example, f_stringss_dynamic_t has an array of f_strings_dynamic_t. + * This size would be sizeof(f_strings_dynamic_t). + * This would neither be a size of (f_char_t) nor would it be a size of f_strings_dynamicss_t. + * * Must not be 0. * @param array * The structure.array to resize. @@ -79,6 +85,12 @@ extern "C" { * @param width * The size of the structure represented by array. * The word "width" is used due to conflicts of already using "length" and "size". + * + * This size represents the array type and not an inner types. + * For example, f_stringss_dynamic_t has an array of f_strings_dynamic_t. + * This size would be sizeof(f_strings_dynamic_t). + * This would neither be a size of (f_char_t) nor would it be a size of f_strings_dynamicss_t. + * * Must not be 0. * @param array * The structure.array to resize. -- 1.8.3.1