diff options
author | Jarkko Hietaniemi <jhi@iki.fi> | 2014-07-21 10:41:20 -0400 |
---|---|---|
committer | Jarkko Hietaniemi <jhi@iki.fi> | 2014-07-22 21:31:41 -0400 |
commit | 6313e54401f5531a23184b7afaaf6bc7cd4a81ec (patch) | |
tree | 8a09ae74353a6697f0e652b1d8577441f3cb456e /embed.fnc | |
parent | 6e75769d300856d7c215fc22d503cce13b734a0f (diff) | |
download | perl-6313e54401f5531a23184b7afaaf6bc7cd4a81ec.tar.gz |
Implement grok_atou as safe/strict atoi replacement.
For earlier discussion, see:
http://www.nntp.perl.org/group/perl.perl5.porters/2013/10/msg208680.html
https://rt.perl.org/Public/Bug/Display.html?id=116118#txn-1250187
grok_atou is completely new code, instead of trying to bolt
new parameters/flags to grok_number. This makes it easier to
be extremely strict, and not worry about breaking grok_number.
Diffstat (limited to 'embed.fnc')
-rw-r--r-- | embed.fnc | 1 |
1 files changed, 1 insertions, 0 deletions
@@ -807,6 +807,7 @@ Apd |int |grok_number |NN const char *pv|STRLEN len|NULLOK UV *valuep Apd |int |grok_number_flags|NN const char *pv|STRLEN len|NULLOK UV *valuep|U32 flags ApdR |bool |grok_numeric_radix|NN const char **sp|NN const char *send Apd |UV |grok_oct |NN const char* start|NN STRLEN* len_p|NN I32* flags|NULLOK NV *result +Apdn |Size_t |grok_atou |NN const char* pv|NULLOK const char** endptr : These are all indirectly referenced by globals.c. This is somewhat annoying. p |int |magic_clearenv |NN SV* sv|NN MAGIC* mg p |int |magic_clear_all_env|NN SV* sv|NN MAGIC* mg |