pike.git / src / builtin_functions.c

version» Context lines:

pike.git/src/builtin_functions.c:655:    return;    }       orig = Pike_sp[-args].u.string;       if( orig->flags & STRING_IS_LOWERCASE )    return;       ret = begin_wide_shared_string(orig->len, orig->size_shift);    -  MEMCPY(ret->str, orig->str, orig->len << orig->size_shift); +  memcpy(ret->str, orig->str, orig->len << orig->size_shift);       i = orig->len;       if (!orig->size_shift) {    p_wchar0 *str = STR0(ret);       while(i--) {    DO_LOWER_CASE_SHIFT0(str[i]);    }    } else if (orig->size_shift == 1) {
pike.git/src/builtin_functions.c:731:    return;    }       orig = Pike_sp[-args].u.string;    if( orig->flags & STRING_IS_UPPERCASE )    {    return;    }       ret=begin_wide_shared_string(orig->len,orig->size_shift); -  MEMCPY(ret->str, orig->str, orig->len << orig->size_shift); +  memcpy(ret->str, orig->str, orig->len << orig->size_shift);       i = orig->len;       if (!orig->size_shift) {    p_wchar0 *str = STR0(ret);       while(i--) {    if(str[i]!=0xff && str[i]!=0xb5) {    DO_UPPER_CASE_SHIFT0(str[i]);    } else {
pike.git/src/builtin_functions.c:1718:    /* 16 bit characters */    /* FIXME: Should we check for 0xfffe & 0xffff here too? */    len = in->len * 2;    out = begin_shared_string(len);   #if (PIKE_BYTEORDER == 4321)    /* Big endian -- We don't need to do much...    *    * FIXME: Future optimization: Check if refcount is == 1,    * and perform sufficient magic to be able to convert in place.    */ -  MEMCPY(out->str, in->str, len); +  memcpy(out->str, in->str, len);   #else    /* Other endianness, may need to do byte-order conversion also. */    {    p_wchar1 *str1 = STR1(in);    for(i = in->len; i--;) {    unsigned INT32 c = str1[i];    out->str[i * 2 + 1] = c & 0xff;    out->str[i * 2] = c >> 8;    }    }
pike.git/src/builtin_functions.c:1897:       } else       str2[i] = str0[-1];       } else    /*    * FIXME: Future optimization: Perform sufficient magic    * to do the conversion in place if the ref-count is == 1.    */ -  MEMCPY(out->str, (char *)(str0-len), len*2); +  memcpy(out->str, (char *)(str0-len), len*2);    } else {    /* Reverse endian */       if (num_surrogates) {    /* Convert surrogates */       p_wchar2 *str2 = STR2(out);       for (i = len; i--; --str0) {