feat: (errcode) geosWrapper.c

This commit is contained in:
Shungang Li 2024-07-19 11:36:03 +08:00
parent ae86af72bf
commit bebe2c5266
1 changed files with 5 additions and 5 deletions

View File

@ -86,8 +86,8 @@ _exit:
return code; return code;
} }
static int initWktRegex(pcre2_code **ppRegex, pcre2_match_data **ppMatchData) { static int32_t initWktRegex(pcre2_code **ppRegex, pcre2_match_data **ppMatchData) {
int ret = 0; int32_t code = 0;
char *wktPatternWithSpace = taosMemoryCalloc(4, 1024); char *wktPatternWithSpace = taosMemoryCalloc(4, 1024);
sprintf( sprintf(
wktPatternWithSpace, wktPatternWithSpace,
@ -142,9 +142,9 @@ static int initWktRegex(pcre2_code **ppRegex, pcre2_match_data **ppMatchData) {
"*)(([-+]?[0-9]+\\.?[0-9]*)|([-+]?[0-9]*\\.?[0-9]+))(e[-+]?[0-9]+)?){1,3}( *))*( *)\\)))( *))*( *)\\)))( *))*( " "*)(([-+]?[0-9]+\\.?[0-9]*)|([-+]?[0-9]*\\.?[0-9]+))(e[-+]?[0-9]+)?){1,3}( *))*( *)\\)))( *))*( *)\\)))( *))*( "
"*)\\)))|(GEOCOLLECTION\\((?R)(( *)(,)( *)(?R))*( *)\\))( *)$"); "*)\\)))|(GEOCOLLECTION\\((?R)(( *)(,)( *)(?R))*( *)\\))( *)$");
ret = doRegComp(ppRegex, ppMatchData, wktPatternWithSpace); code = doRegComp(ppRegex, ppMatchData, wktPatternWithSpace);
taosMemoryFree(wktPatternWithSpace); taosMemoryFree(wktPatternWithSpace);
return ret; return code;
} }
int32_t initCtxGeomFromText() { int32_t initCtxGeomFromText() {