diff options
author | Nicholas Clark <nick@ccl4.org> | 2009-02-15 14:35:36 +0000 |
---|---|---|
committer | Nicholas Clark <nick@ccl4.org> | 2009-02-15 17:40:59 +0000 |
commit | 55b4bc1cac18bd560bcd9386594a419294fafc1d (patch) | |
tree | c84762d158b08bee5310441c5e99d8db881adef6 /proto.h | |
parent | 20ce4c11399f59a97d3594520606e1c947b4dde3 (diff) | |
download | perl-55b4bc1cac18bd560bcd9386594a419294fafc1d.tar.gz |
Refactor the separator splitting loop of S_incpush() into a S_incpush_use_sep().
Add a parameter to S_incpush() to optionally pass in the length. As S_incpush()
treats the directory parameter as const char, remove some malloc()s elsewhere
that were copying data on the assumption that it was not const safe.
Diffstat (limited to 'proto.h')
-rw-r--r-- | proto.h | 3 |
1 files changed, 2 insertions, 1 deletions
@@ -4759,7 +4759,8 @@ STATIC void S_find_beginning(pTHX_ SV* linestr_sv, PerlIO *rsfp) assert(linestr_sv); assert(rsfp) STATIC void S_forbid_setid(pTHX_ const char flag, const bool suidscript); -STATIC void S_incpush(pTHX_ const char *dir, U32 flags); +STATIC void S_incpush(pTHX_ const char *const dir, STRLEN len, U32 flags); +STATIC void S_incpush_use_sep(pTHX_ const char *p, U32 flags); STATIC void S_init_interp(pTHX); STATIC void S_init_ids(pTHX); STATIC void S_init_main_stash(pTHX); |