376 |
for (i = 0; i < double_count; i += 2) |
for (i = 0; i < double_count; i += 2) |
377 |
size += sizeof(pcre_uchar *) + IN_UCHARS(ovector[i+1] - ovector[i] + 1); |
size += sizeof(pcre_uchar *) + IN_UCHARS(ovector[i+1] - ovector[i] + 1); |
378 |
|
|
379 |
stringlist = (pcre_uchar **)(pcre_malloc)(size); |
stringlist = (pcre_uchar **)(PUBL(malloc))(size); |
380 |
if (stringlist == NULL) return PCRE_ERROR_NOMEMORY; |
if (stringlist == NULL) return PCRE_ERROR_NOMEMORY; |
381 |
|
|
382 |
#ifdef COMPILE_PCRE8 |
#ifdef COMPILE_PCRE8 |
406 |
*************************************************/ |
*************************************************/ |
407 |
|
|
408 |
/* This function exists for the benefit of people calling PCRE from non-C |
/* This function exists for the benefit of people calling PCRE from non-C |
409 |
programs that can call its functions, but not free() or (pcre_free)() directly. |
programs that can call its functions, but not free() or (PUBL(free))() |
410 |
|
directly. |
411 |
|
|
412 |
Argument: the result of a previous pcre_get_substring_list() |
Argument: the result of a previous pcre_get_substring_list() |
413 |
Returns: nothing |
Returns: nothing |
421 |
pcre16_free_substring_list(PCRE_SPTR16 *pointer) |
pcre16_free_substring_list(PCRE_SPTR16 *pointer) |
422 |
#endif |
#endif |
423 |
{ |
{ |
424 |
(pcre_free)((void *)pointer); |
(PUBL(free))((void *)pointer); |
425 |
} |
} |
426 |
|
|
427 |
|
|
467 |
return PCRE_ERROR_NOSUBSTRING; |
return PCRE_ERROR_NOSUBSTRING; |
468 |
stringnumber *= 2; |
stringnumber *= 2; |
469 |
yield = ovector[stringnumber+1] - ovector[stringnumber]; |
yield = ovector[stringnumber+1] - ovector[stringnumber]; |
470 |
substring = (pcre_uchar *)(pcre_malloc)(IN_UCHARS(yield + 1)); |
substring = (pcre_uchar *)(PUBL(malloc))(IN_UCHARS(yield + 1)); |
471 |
if (substring == NULL) return PCRE_ERROR_NOMEMORY; |
if (substring == NULL) return PCRE_ERROR_NOMEMORY; |
472 |
memcpy(substring, subject + ovector[stringnumber], IN_UCHARS(yield)); |
memcpy(substring, subject + ovector[stringnumber], IN_UCHARS(yield)); |
473 |
substring[yield] = 0; |
substring[yield] = 0; |
535 |
*************************************************/ |
*************************************************/ |
536 |
|
|
537 |
/* This function exists for the benefit of people calling PCRE from non-C |
/* This function exists for the benefit of people calling PCRE from non-C |
538 |
programs that can call its functions, but not free() or (pcre_free)() directly. |
programs that can call its functions, but not free() or (PUBL(free))() |
539 |
|
directly. |
540 |
|
|
541 |
Argument: the result of a previous pcre_get_substring() |
Argument: the result of a previous pcre_get_substring() |
542 |
Returns: nothing |
Returns: nothing |
550 |
pcre16_free_substring(PCRE_SPTR16 pointer) |
pcre16_free_substring(PCRE_SPTR16 pointer) |
551 |
#endif |
#endif |
552 |
{ |
{ |
553 |
(pcre_free)((void *)pointer); |
(PUBL(free))((void *)pointer); |
554 |
} |
} |
555 |
|
|
556 |
/* End of pcre_get.c */ |
/* End of pcre_get.c */ |