mirror of
https://github.com/servo/servo.git
synced 2025-08-03 20:50:07 +01:00
Replace null-byte terminated string literals with C-string literals (#32716)
* simple conversion from byte string to c-string Signed-off-by: Bum Kim <bumcrystlbum@gmail.com> * convert byte strings to c-strings to c_char ptr Signed-off-by: Bum Kim <bumcrystlbum@gmail.com> --------- Signed-off-by: Bum Kim <bumcrystlbum@gmail.com>
This commit is contained in:
parent
59d0f1fe1a
commit
141a594e23
6 changed files with 29 additions and 29 deletions
|
@ -215,13 +215,13 @@ unsafe extern "C" fn is_extensible(
|
|||
|
||||
#[allow(unsafe_code)]
|
||||
unsafe extern "C" fn class_name(_cx: *mut JSContext, _proxy: HandleObject) -> *const libc::c_char {
|
||||
&b"WindowProperties\0" as *const _ as *const _
|
||||
c"WindowProperties".as_ptr()
|
||||
}
|
||||
|
||||
// Maybe this should be a DOMJSClass. See https://bugzilla.mozilla.org/show_bug.cgi?id=787070
|
||||
#[allow(unsafe_code)]
|
||||
static CLASS: JSClass = JSClass {
|
||||
name: b"WindowProperties\0" as *const u8 as *const libc::c_char,
|
||||
name: c"WindowProperties".as_ptr(),
|
||||
flags: JSClass_NON_NATIVE |
|
||||
JSCLASS_IS_PROXY |
|
||||
JSCLASS_DELAY_METADATA_BUILDER |
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue