Changeset 5264 in webkit for trunk/JavaScriptCore/kjs


Ignore:
Timestamp:
Oct 26, 2003, 8:21:15 PM (22 years ago)
Author:
darin
Message:
  • rolled in some CString changes Harri Porten did on the KDE side
  • kjs/ustring.cpp: (KJS::CString::CString): Use memcpy instead of strcpy for speed. Fix an off by one error in the copy constructor. (KJS::CString::operator=): Use memcpy instead of strcpy for speed.
  • JavaScriptCorePrefix.h: Add a definition of NULL here that matches the one in Merlot. This makes us see warnings that otherwise would be Merlot-only warnings.
File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/JavaScriptCore/kjs/ustring.cpp

    r4837 r5264  
    5151  length = strlen(c);
    5252  data = new char[length+1];
    53   strcpy(data, c);
     53  memcpy(data, c, length + 1);
    5454}
    5555
     
    6666  length = b.length;
    6767  data = new char[length+1];
    68   memcpy(data, b.data, length);
     68  memcpy(data, b.data, length + 1);
    6969}
    7070
     
    9797  length = strlen(c);
    9898  data = new char[length+1];
    99   strcpy(data, c);
     99  memcpy(data, c, length + 1);
    100100
    101101  return *this;
Note: See TracChangeset for help on using the changeset viewer.