@@ -16,7 +16,7 @@ use tendril::StrTendril;
16
16
17
17
/// When given as a function parameter, only valid for the duration of the call.
18
18
#[ repr( C ) ]
19
- #[ derive( Copy , Clone ) ]
19
+ #[ derive( Copy , Clone , Debug ) ]
20
20
#[ allow( raw_pointer_derive) ]
21
21
pub struct BytesSlice {
22
22
ptr : * const u8 ,
@@ -38,7 +38,7 @@ impl BytesSlice {
38
38
39
39
/// When given as a function parameter, only valid for the duration of the call.
40
40
#[ repr( C ) ]
41
- #[ derive( Copy , Clone ) ]
41
+ #[ derive( Copy , Clone , Debug ) ]
42
42
pub struct Utf8Slice ( BytesSlice ) ;
43
43
44
44
impl Utf8Slice {
@@ -207,6 +207,7 @@ impl TreeSink for CallbackTreeSink {
207
207
public_id : StrTendril ,
208
208
system_id : StrTendril ) {
209
209
check_int ( call ! ( self , append_doctype_to_document(
210
+ 0 ,
210
211
Utf8Slice :: from_str( & name) ,
211
212
Utf8Slice :: from_str( & public_id) ,
212
213
Utf8Slice :: from_str( & system_id) ) ) ) ;
@@ -319,6 +320,9 @@ declare_with_callbacks! {
319
320
320
321
/// Create a doctype node and append it to the document.
321
322
callback append_doctype_to_document: extern "C" fn ( * const OpaqueParserUserData ,
323
+ // Work around https://github.com/rust-lang/rust/pull/27017
324
+ // Add some padding so that the last Utf8Slice is not split between registers and the stack.
325
+ usize ,
322
326
Utf8Slice , Utf8Slice , Utf8Slice ) -> c_int
323
327
324
328
callback append_node: extern "C" fn ( * const OpaqueParserUserData ,
0 commit comments