Closed Bug 1374937 Opened 7 years ago Closed 7 years ago

Vendor encoding_c 0.7.6 into m-c

Categories

(Core :: Internationalization, enhancement)

enhancement
Not set
normal

Tracking

()

RESOLVED FIXED
mozilla56
Tracking Status
firefox56 --- fixed

People

(Reporter: hsivonen, Assigned: hsivonen)

References

Details

Attachments

(1 file)

Pick up changes that support bug 1374629.
Comment on attachment 8879840 [details]
Bug 1374937 - Vendor encoding_c 0.7.6 into m-c.

https://reviewboard.mozilla.org/r/151242/#review156196

::: third_party/rust/encoding_c/include/encoding_rs.h:130
(Diff revision 1)
>  ///
>  /// # Undefined behavior
>  ///
>  /// UB ensues if `name` and `name_len` don't designate a valid memory block
>  /// of if `name` is `NULL`.
> -ENCODING_RS_ENCODING const* encoding_for_name(uint8_t const* name, size_t name_len);
> +ENCODING_RS_NON_NULL_CONST_ENCODING_PTR encoding_for_name(uint8_t const* name, size_t name_len);

This caused a compiler error C2526:
10:54.81 f:\m\mozilla-unified\obj-x86_64-pc-mingw32\dist\include\encoding_rs.h(130): error C2526: 'encoding_for_name' : C linkage function cannot return C++ class 'mozilla::NotNull<const mozilla::Encoding *>'

So you can't make them NotNull, unfortunately. Please revert this part of change.
Attachment #8879840 - Flags: review?(VYV03354) → review-
Summary: Vendor encoding_c 0.7.5 into m-c → Vendor encoding_c 0.7.6 into m-c
I took the opportunity to change the macro to ENCODING_RS_NOT_NULL_CONST_ENCODING_PTR (NOT instead of NON) for consistency with the relevant C++ types saying "not" instead of "non".
Comment on attachment 8879840 [details]
Bug 1374937 - Vendor encoding_c 0.7.6 into m-c.

https://reviewboard.mozilla.org/r/151242/#review156302
Attachment #8879840 - Flags: review?(VYV03354) → review+
Pushed by hsivonen@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/81710b0b6ce3
Vendor encoding_c 0.7.6 into m-c. r=emk
https://hg.mozilla.org/mozilla-central/rev/81710b0b6ce3
Status: ASSIGNED → RESOLVED
Closed: 7 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla56
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: