[libc-commits] [libc] [libc] Add max length argument to decimal to float (PR #84091)

Michael Jones via libc-commits libc-commits at lists.llvm.org
Wed Mar 6 11:04:48 PST 2024


================
@@ -296,45 +298,52 @@ class HighPrecisionDecimal {
   }
 
 public:
-  // numString is assumed to be a string of numeric characters. It doesn't
+  // num_string is assumed to be a string of numeric characters. It doesn't
   // handle leading spaces.
-  HighPrecisionDecimal(const char *__restrict numString) {
+  LIBC_INLINE
+  HighPrecisionDecimal(
+      const char *__restrict num_string,
----------------
michaelrj-google wrote:

it was just me propagating the restrict property down from the original call. Here's the prototype from the man page: `double strtod(const char *restrict nptr, char **restrict endptr);`

https://github.com/llvm/llvm-project/pull/84091


More information about the libc-commits mailing list