mirror of
https://github.com/signalwire/freeswitch.git
synced 2026-10-29 06:34:19 +00:00
adding const qualifiers across the api as appropriate.
git-svn-id: http://svn.freeswitch.org/svn/freeswitch/trunk@5165 d0543943-73ff-0310-b7d9-9358b9ac24b2
This commit is contained in:
1 parent
8107c49a64
commit
a4ff7e88da
32 files changed
+255
-206
No files matched your search
+19
-8
@@ -32,12 +32,19 @@
|
||||
|
||||
#include <switch.h>
|
||||
#include <pcre.h>
|
||||
␍ ␍SWITCH_DECLARE(switch_regex_t *) switch_regex_compile(const char *pattern,
|
||||
int options, const char **errorptr, int *erroroffset, ␍const unsigned char *tables)
|
||||
|
||||
|
||||
SWITCH_DECLARE(switch_regex_t *) switch_regex_compile(const char *pattern,
|
||||
int options, const char **errorptr, int *erroroffset,
|
||||
const unsigned char *tables)
|
||||
{
|
||||
␍return pcre_compile(pattern, options, errorptr, erroroffset, tables);
|
||||
␍}
|
||||
␍␍SWITCH_DECLARE(int) switch_regex_copy_substring(const char *subject, int *ovector, int stringcount, int stringnumber, char *buffer, int size)
|
||||
|
||||
return pcre_compile(pattern, options, errorptr, erroroffset, tables);
|
||||
|
||||
}
|
||||
|
||||
|
||||
SWITCH_DECLARE(int) switch_regex_copy_substring(const char *subject, int *ovector, int stringcount, int stringnumber, char *buffer, int size)
|
||||
{
|
||||
return pcre_copy_substring(subject, ovector, stringcount, stringnumber, buffer, size);
|
||||
}
|
||||
@@ -45,7 +52,10 @@
|
||||
SWITCH_DECLARE(void) switch_regex_free(void *data)
|
||||
{
|
||||
pcre_free(data);
|
||||
␍} ␍␍SWITCH_DECLARE(int) switch_regex_perform(char *field, char *expression, switch_regex_t **new_re, int *ovector, uint32_t olen)
|
||||
|
||||
}
|
||||
|
||||
SWITCH_DECLARE(int) switch_regex_perform(const char *field, const char *expression, switch_regex_t **new_re, int *ovector, uint32_t olen)
|
||||
{
|
||||
const char *error = NULL;
|
||||
int erroffset = 0;
|
||||
@@ -87,7 +97,7 @@ SWITCH_DECLARE(void) switch_regex_free(void *data)
|
||||
}
|
||||
|
||||
|
||||
SWITCH_DECLARE(void) switch_perform_substitution(switch_regex_t *re, int match_count, char *data, char *field_data,
|
||||
SWITCH_DECLARE(void) switch_perform_substitution(switch_regex_t *re, int match_count, const char *data, const char *field_data,
|
||||
char *substituted, uint32_t len, int *ovector)
|
||||
{
|
||||
char index[10] = "";
|
||||
@@ -124,7 +134,8 @@ SWITCH_DECLARE(void) switch_perform_substitution(switch_regex_t *re, int match_c
|
||||
}
|
||||
substituted[y++] = '\0';
|
||||
}
|
||||
␍SWITCH_DECLARE(switch_status_t) switch_regex_match(char *target, char *expression)
|
||||
|
||||
SWITCH_DECLARE(switch_status_t) switch_regex_match(const char *target, const char *expression)
|
||||
{
|
||||
const char *error = NULL; //Used to hold any errors
|
||||
int error_offset = 0; //Holds the offset of an error
|
||||
|
||||
Reference in new issue
Block a user