@@ -103,7 +103,7 @@ lxb_unicode_normalizer_init(lxb_unicode_normalizer_t *uc,
103
103
return status ;
104
104
}
105
105
106
- uc -> tmp_lenght = 0 ;
106
+ uc -> tmp_length = 0 ;
107
107
uc -> starter = NULL ;
108
108
109
109
uc -> buf = lexbor_malloc (buf_length * sizeof (lxb_unicode_buffer_t ));
@@ -123,7 +123,7 @@ lxb_unicode_normalizer_init(lxb_unicode_normalizer_t *uc,
123
123
void
124
124
lxb_unicode_normalizer_clean (lxb_unicode_normalizer_t * uc )
125
125
{
126
- uc -> tmp_lenght = 0 ;
126
+ uc -> tmp_length = 0 ;
127
127
uc -> starter = NULL ;
128
128
uc -> p = uc -> buf ;
129
129
uc -> ican = uc -> buf ;
@@ -328,7 +328,7 @@ lxb_unicode_restore(lxb_unicode_normalizer_t *uc, const lxb_char_t *data,
328
328
lxb_char_t * tmp ;
329
329
330
330
tmp = uc -> tmp ;
331
- len = uc -> tmp_lenght ;
331
+ len = uc -> tmp_length ;
332
332
333
333
i = lxb_encoding_decode_utf_8_length (tmp [0 ]);
334
334
@@ -341,14 +341,14 @@ lxb_unicode_restore(lxb_unicode_normalizer_t *uc, const lxb_char_t *data,
341
341
tmp + i );
342
342
if (* cp == LXB_ENCODING_DECODE_ERROR ) {
343
343
if (!is_last ) {
344
- uc -> tmp_lenght = len ;
344
+ uc -> tmp_length = len ;
345
345
return NULL ;
346
346
}
347
347
348
348
* cp = LXB_ENCODING_REPLACEMENT_CODEPOINT ;
349
349
}
350
350
351
- uc -> tmp_lenght = 0 ;
351
+ uc -> tmp_length = 0 ;
352
352
353
353
return data ;
354
354
}
@@ -393,7 +393,7 @@ lxb_unicode_normalize_body(lxb_unicode_normalizer_t *uc, const void *data,
393
393
length *= (is_cp ) ? sizeof (lxb_codepoint_t ) : 1 ;
394
394
end = (const lxb_char_t * ) data + length ;
395
395
396
- if (uc -> tmp_lenght != 0 && !is_cp ) {
396
+ if (uc -> tmp_length != 0 && !is_cp ) {
397
397
np = lxb_unicode_restore (uc , np , end , & cp , is_last );
398
398
if (np == NULL ) {
399
399
return LXB_STATUS_OK ;
@@ -410,9 +410,9 @@ lxb_unicode_normalize_body(lxb_unicode_normalizer_t *uc, const void *data,
410
410
if (cp == LXB_ENCODING_DECODE_ERROR ) {
411
411
if (np >= end && !is_last ) {
412
412
uc -> p = p ;
413
- uc -> tmp_lenght = end - tp ;
413
+ uc -> tmp_length = end - tp ;
414
414
415
- memcpy (uc -> tmp , tp , uc -> tmp_lenght );
415
+ memcpy (uc -> tmp , tp , uc -> tmp_length );
416
416
417
417
return LXB_STATUS_OK ;
418
418
}
@@ -530,7 +530,7 @@ lxb_unicode_quick_check(lxb_unicode_normalizer_t *uc, const lxb_char_t *data,
530
530
531
531
end = data + length ;
532
532
533
- if (uc -> tmp_lenght != 0 ) {
533
+ if (uc -> tmp_length != 0 ) {
534
534
data = lxb_unicode_restore (uc , data , end , & cp , is_last );
535
535
if (data == NULL ) {
536
536
return LXB_STATUS_OK ;
@@ -545,9 +545,9 @@ lxb_unicode_quick_check(lxb_unicode_normalizer_t *uc, const lxb_char_t *data,
545
545
cp = lxb_encoding_decode_valid_utf_8_single (& data , end );
546
546
if (cp == LXB_ENCODING_DECODE_ERROR ) {
547
547
if (data >= end && !is_last ) {
548
- uc -> tmp_lenght = end - tp ;
548
+ uc -> tmp_length = end - tp ;
549
549
550
- memcpy (uc -> tmp , tp , uc -> tmp_lenght );
550
+ memcpy (uc -> tmp , tp , uc -> tmp_length );
551
551
552
552
return LXB_STATUS_OK ;
553
553
}
0 commit comments