MCPcopy Index your code
hub / github.com/MapServer/MapServer / loadExpression

Function loadExpression

mapfile.c:2062–2081  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

2060}
2061
2062int loadExpression(expressionObj *exp)
2063{
2064 /* TODO: should we fall freeExpression if exp->string != NULL? We do some checking to avoid a leak but is it enough... */
2065
2066 msyystring_icase = MS_TRUE;
2067 if((exp->type = getSymbol(5, MS_STRING,MS_EXPRESSION,MS_REGEX,MS_ISTRING,MS_IREGEX)) == -1) return(-1);
2068 if (exp->string != NULL)
2069 msFree(exp->string);
2070 exp->string = msStrdup(msyystring_buffer);
2071
2072 if(exp->type == MS_ISTRING) {
2073 exp->flags = exp->flags | MS_EXP_INSENSITIVE;
2074 exp->type = MS_STRING;
2075 } else if(exp->type == MS_IREGEX) {
2076 exp->flags = exp->flags | MS_EXP_INSENSITIVE;
2077 exp->type = MS_REGEX;
2078 }
2079
2080 return(0);
2081}
2082
2083/* ---------------------------------------------------------------------------
2084 msLoadExpressionString and loadExpressionString

Callers 3

loadClusterFunction · 0.85
loadClassFunction · 0.85
loadLayerFunction · 0.85

Calls 3

getSymbolFunction · 0.85
msFreeFunction · 0.85
msStrdupFunction · 0.85

Tested by

no test coverage detected