pike.git / src / builtin_functions.c

version» Context lines:

pike.git/src/builtin_functions.c:699:    DO_LOWER_CASE(str[i]);    }   #ifdef PIKE_DEBUG    } else {    Pike_fatal("lower_case(): Bad string shift:%d\n", orig->size_shift);   #endif    }       ret = end_shared_string(ret);    ret->flags |= STRING_IS_LOWERCASE; +  ret->flags |= orig->flags & STRING_CLEAR_ON_EXIT;    pop_n_elems(args);    push_string(ret);   }      /*! @decl string upper_case(string s)    *! @decl int upper_case(int c)    *!    *! Convert a string or character to upper case.    *!    *! @returns
pike.git/src/builtin_functions.c:806: Inside #if defined(PIKE_DEBUG)
   }   #ifdef PIKE_DEBUG    } else {    Pike_fatal("lower_case(): Bad string shift:%d\n", orig->size_shift);   #endif    }       pop_n_elems(args);    ret = end_shared_string(ret);    ret->flags |= STRING_IS_UPPERCASE; +  ret->flags |= orig->flags & STRING_CLEAR_ON_EXIT;    push_string(ret);   }      /*! @decl string random_string(int len)    *!    *! Returns a string of random characters 0-255 with the length @[len].    */   PMOD_EXPORT void f_random_string(INT32 args)   {    struct pike_string *ret;
pike.git/src/builtin_functions.c:1772:    out = end_shared_string(out);    }    break;   #ifdef PIKE_DEBUG    default:    Pike_fatal("string_to_unicode(): Bad string shift: %d!\n", in->size_shift);    break;   #endif    }    pop_n_elems(args); +  out->flags |= in->flags & STRING_CLEAR_ON_EXIT;    push_string(out);   }      /*! @decl string unicode_to_string(string(0..255) s)    *!    *! Converts an UTF16 byte-stream into a string.    *!    *! @note    *! This function did not decode surrogates in Pike 7.2 and earlier.    *!
pike.git/src/builtin_functions.c:1931:    ((unsigned char *)str0)[-2];   #else /* PIKE_BYTEORDER != 4321 */    str1[i] = (((unsigned char *)str0)[-2]<<8) +    ((unsigned char *)str0)[-1];   #endif /* PIKE_BYTEORDER == 4321 */    }    }    }    out = end_shared_string(out);    pop_n_elems(args); +  out->flags |= in->flags & STRING_CLEAR_ON_EXIT;    push_string(out);   }      /*! @decl string(0..255) string_to_utf8(string s)    *! @decl string(0..255) string_to_utf8(string s, int extended)    *!    *! Converts a string into an UTF-8 compliant byte-stream.    *!    *! @note    *! Throws an error if characters not valid in an UTF-8 stream are
pike.git/src/builtin_functions.c:2075:    }    }   #ifdef PIKE_DEBUG    if (len != j) {    Pike_fatal("string_to_utf8(): Calculated and actual lengths differ: "    "%"PRINTPTRDIFFT"d != %"PRINTPTRDIFFT"d\n", len, j);    }   #endif /* PIKE_DEBUG */    out = end_shared_string(out);    pop_n_elems(args); +  out->flags |= in->flags & STRING_CLEAR_ON_EXIT;    push_string(out);   }      /*! @decl string utf8_to_string(string(0..255) s)    *! @decl string utf8_to_string(string(0..255) s, int extended)    *!    *! Converts an UTF-8 byte-stream into a string.    *!    *! @param s    *! String of UTF-8 encoded data to decode.
pike.git/src/builtin_functions.c:2428: Inside #if defined(PIKE_DEBUG)
   Pike_fatal("utf8_to_string(): Calculated and actual lengths differ: "    "%"PRINTPTRDIFFT"d != %"PRINTPTRDIFFT"d\n",    len, j);    }   #endif /* PIKE_DEBUG */    out = low_end_shared_string(out);   #ifdef PIKE_DEBUG    check_string (out);   #endif    pop_n_elems(args); +  out->flags |= in->flags & STRING_CLEAR_ON_EXIT;    push_string(out);   }      /*! @decl string(0..255) __parse_pike_type(string(0..255) t)    */   static void f_parse_pike_type( INT32 args )   {    struct pike_type *t;       if( !args || TYPEOF(Pike_sp[-1]) != T_STRING ||