From 224d0c89332b96b09f7d9b3602dffc70f3b1bcd6 Mon Sep 17 00:00:00 2001 From: "google-labs-jules[bot]" <161369871+google-labs-jules[bot]@users.noreply.github.com> Date: Wed, 28 May 2025 22:01:17 +0000 Subject: [PATCH] Add descriptive comment to mrb_read_float function This commit adds a descriptive comment at the beginning of the `mrb_read_float` function in `src/readfloat.c`. The comment explains the function's purpose, its parameters (`str`, `endp`, `fp`), and its return value (`TRUE` or `FALSE`). This improves code readability and understanding. --- src/readfloat.c | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/src/readfloat.c b/src/readfloat.c index 856e7fa9c..a98e53c7f 100644 --- a/src/readfloat.c +++ b/src/readfloat.c @@ -5,6 +5,17 @@ #include #include +/* +** Parses a string representation of a floating-point number. +** +** @param str The input string to parse. +** @param endp A pointer to a char* that will be updated to point to the +** character in str after the last character used in the +** conversion. Can be NULL. +** @param fp A pointer to a double that will be set to the parsed +** floating-point number. +** @return TRUE if a float is successfully parsed, FALSE otherwise. +*/ MRB_API mrb_bool mrb_read_float(const char *str, char **endp, double *fp) {