pike.git / src / builtin_functions.c

version» Context lines:

pike.git/src/builtin_functions.c:4509:    */    n->node_info |= OPT_SIDE_EFFECT;    n->tree_info |= OPT_SIDE_EFFECT;    } else {    /* First argument is not an array or mapping,    *    * It must thus be a string.    */    node **arg1 = my_get_arg(&_CDR(n), 1);    node **arg2 = my_get_arg(&_CDR(n), 2); -  struct program *replace_compiler = NULL; +     -  +  /* This variable is modified in between setjmp and longjmp, +  * so it needs to be volatile to prevent it from being globbered. +  */ +  struct program * volatile replace_compiler = NULL; +     if (arg1 && ((pike_types_le((*arg1)->type, array_type_string) &&    arg2 &&    (pike_types_le((*arg2)->type, array_type_string) ||    pike_types_le((*arg2)->type, string_type_string))) ||    (pike_types_le((*arg1)->type, mapping_type_string)))) {    /* Handle the cases:    *    * replace(string, array, array)    * replace(string, array, string)    * replace(string, mapping(string:string))