summaryrefslogtreecommitdiff
path: root/embed.fnc
diff options
context:
space:
mode:
authorKarl Williamson <khw@cpan.org>2018-04-30 10:46:01 -0600
committerKarl Williamson <khw@cpan.org>2018-06-25 07:33:26 -0600
commit6928bedc792ff80f0cb915460a7eacae25fa9bdd (patch)
treecb3daacc7529120825d1bbe72bd3a112cdf9f9f6 /embed.fnc
parent808ea3ad2891b03a3f9c239b9b99d56b4765d765 (diff)
downloadperl-6928bedc792ff80f0cb915460a7eacae25fa9bdd.tar.gz
Create my_atof3()
This is like my_atof2(), but with an extra argument signifying the length of the input string to parse. If that length is 0, it uses strlen() to determine it. Then my_atof2() just calls my_atof3() with a zero final parameter. And this commit just uses the bulk of the current my_atof2() as the core of my_atof3(). Changes were needed however, because it relied on NUL-termination in a number of places. This allows one to convert a string that isn't necessarily NUL-terminated to an NV.
Diffstat (limited to 'embed.fnc')
-rw-r--r--embed.fnc3
1 files changed, 2 insertions, 1 deletions
diff --git a/embed.fnc b/embed.fnc
index 810bc9353d..7c606f4b5c 100644
--- a/embed.fnc
+++ b/embed.fnc
@@ -2909,7 +2909,8 @@ Apd |char* |sv_pvn_force_flags|NN SV *const sv|NULLOK STRLEN *const lp|const I32
Apmb |void |sv_copypv |NN SV *const dsv|NN SV *const ssv
Apmd |void |sv_copypv_nomg |NN SV *const dsv|NN SV *const ssv
Apd |void |sv_copypv_flags |NN SV *const dsv|NN SV *const ssv|const I32 flags
-Ap |char* |my_atof2 |NN const char *orig|NN NV* value
+Apo |char* |my_atof2 |NN const char *orig|NN NV* value
+Ap |char* |my_atof3 |NN const char *orig|NN NV* value|const STRLEN len
Apn |int |my_socketpair |int family|int type|int protocol|int fd[2]
Apn |int |my_dirfd |NULLOK DIR* dir
#ifdef PERL_ANY_COW