diff options
author | ph10 <ph10@6239d852-aaf2-0410-a92c-79f79f948069> | 2014-08-15 09:19:04 +0000 |
---|---|---|
committer | ph10 <ph10@6239d852-aaf2-0410-a92c-79f79f948069> | 2014-08-15 09:19:04 +0000 |
commit | ad38ecd3161732395fddbb4763f5c4b20c5b63cf (patch) | |
tree | 4d9a36fbbfb27946202062fcea5b2264287cd245 /src/pcre2_substring.c | |
parent | 7e67fdc349687c03ea2d721fc92e0af72b7dcd5e (diff) | |
download | pcre2-ad38ecd3161732395fddbb4763f5c4b20c5b63cf.tar.gz |
Specifying that the pcre2_memctl block must be at the start of all relevant
blocks simplifies the code.
git-svn-id: svn://vcs.exim.org/pcre2/code/trunk@53 6239d852-aaf2-0410-a92c-79f79f948069
Diffstat (limited to 'src/pcre2_substring.c')
-rw-r--r-- | src/pcre2_substring.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/pcre2_substring.c b/src/pcre2_substring.c index 307ab4f..a69c902 100644 --- a/src/pcre2_substring.c +++ b/src/pcre2_substring.c @@ -210,7 +210,7 @@ if (stringnumber >= match_data->oveccount || right = match_data->ovector[stringnumber*2+1]; block = PRIV(memctl_malloc)(sizeof(pcre2_memctl) + - (right-left+1)*PCRE2_CODE_UNIT_WIDTH, 0, &(match_data->memctl)); + (right-left+1)*PCRE2_CODE_UNIT_WIDTH, (pcre2_memctl *)match_data); if (block == NULL) return PCRE2_ERROR_NOMEMORY; yield = (PCRE2_UCHAR *)((char *)block + sizeof(pcre2_memctl)); @@ -346,7 +346,7 @@ if (lengthsptr != NULL) size += sizeof(size_t) * count; /* For lengths */ for (i = 0; i < count2; i += 2) size += sizeof(PCRE2_UCHAR *) + CU2BYTES(ovector[i+1] - ovector[i] + 1); -memp = PRIV(memctl_malloc)(size, 0, &(match_data->memctl)); +memp = PRIV(memctl_malloc)(size, (pcre2_memctl *)match_data); if (memp == NULL) return PCRE2_ERROR_NOMEMORY; *listptr = listp = (PCRE2_UCHAR **)((char *)memp + sizeof(pcre2_memctl)); |