|
2 | 2 | * License, v. 2.0. If a copy of the MPL was not distributed with this
|
3 | 3 | * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
|
4 | 4 |
|
5 |
| -#![feature(const_fn)] |
6 |
| -#![feature(const_ptr_null)] |
7 | 5 | #![cfg(feature = "debugmozjs")]
|
8 | 6 |
|
9 | 7 | #[macro_use]
|
@@ -57,32 +55,26 @@ unsafe extern "C" fn generic_method(_: *mut JSContext, _: u32, _: *mut Value) ->
|
57 | 55 | const METHODS: &'static [JSFunctionSpec] = &[
|
58 | 56 | JSFunctionSpec {
|
59 | 57 | name: b"addEventListener\0" as *const u8 as *const libc::c_char,
|
60 |
| - call: JSNativeWrapper { op: Some(generic_method), info: ptr::null() }, |
| 58 | + call: JSNativeWrapper { op: Some(generic_method), info: 0 as *const _ }, |
61 | 59 | nargs: 2,
|
62 | 60 | flags: JSPROP_ENUMERATE as u16,
|
63 | 61 | selfHostedName: 0 as *const libc::c_char
|
64 | 62 | },
|
65 | 63 | JSFunctionSpec {
|
66 | 64 | name: b"removeEventListener\0" as *const u8 as *const libc::c_char,
|
67 |
| - call: JSNativeWrapper { op: Some(generic_method), info: ptr::null() }, |
| 65 | + call: JSNativeWrapper { op: Some(generic_method), info: 0 as *const _ }, |
68 | 66 | nargs: 2,
|
69 | 67 | flags: JSPROP_ENUMERATE as u16,
|
70 | 68 | selfHostedName: 0 as *const libc::c_char
|
71 | 69 | },
|
72 | 70 | JSFunctionSpec {
|
73 | 71 | name: b"dispatchEvent\0" as *const u8 as *const libc::c_char,
|
74 |
| - call: JSNativeWrapper { op: Some(generic_method), info: ptr::null() }, |
| 72 | + call: JSNativeWrapper { op: Some(generic_method), info: 0 as *const _ }, |
75 | 73 | nargs: 1,
|
76 | 74 | flags: JSPROP_ENUMERATE as u16,
|
77 | 75 | selfHostedName: 0 as *const libc::c_char
|
78 | 76 | },
|
79 |
| - JSFunctionSpec { |
80 |
| - name: ptr::null(), |
81 |
| - call: JSNativeWrapper { op: None, info: ptr::null() }, |
82 |
| - nargs: 0, |
83 |
| - flags: 0, |
84 |
| - selfHostedName: ptr::null() |
85 |
| - } |
| 77 | + JSFunctionSpec::ZERO, |
86 | 78 | ];
|
87 | 79 |
|
88 | 80 | static CLASS: JSClass = JSClass {
|
|
0 commit comments