Skip to content

Commit 4b0027d

Browse files
committed
Rename Encoding::C_U_LONG -> Encoding::C_ULONG
1 parent f101615 commit 4b0027d

File tree

4 files changed

+12
-9
lines changed

4 files changed

+12
-9
lines changed

objc2-encode/CHANGELOG.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,9 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/).
66

77
## Unreleased - YYYY-MM-DD
88

9+
### Changed
10+
* **BREAKING**: Renamed `Encoding::C_U_LONG` to `Encoding::C_ULONG`.
11+
912

1013
## 2.0.0-pre.0 - 2022-06-13
1114

objc2-encode/src/encoding.rs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -161,13 +161,13 @@ impl Encoding<'_> {
161161
/// The encoding of [`c_ulong`](`std::os::raw::c_ulong`).
162162
///
163163
/// See [`Encoding::C_LONG`] for explanation.
164-
pub const C_U_LONG: Self = {
164+
pub const C_ULONG: Self = {
165165
if cfg!(any(target_pointer_width = "32", windows)) {
166166
// @encode(unsigned long) = 'L'
167-
Encoding::ULong
167+
Self::ULong
168168
} else {
169169
// @encode(unsigned long) = 'Q'
170-
Encoding::ULongLong
170+
Self::ULongLong
171171
}
172172
};
173173

objc2-foundation/src/enumerator.rs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -57,10 +57,10 @@ unsafe impl<T: Message> Encode for NSFastEnumerationState<T> {
5757
const ENCODING: Encoding<'static> = Encoding::Struct(
5858
"?",
5959
&[
60-
Encoding::C_U_LONG,
60+
Encoding::C_ULONG,
6161
Encoding::Pointer(&Encoding::Object), // <*const *const T>::ENCODING
62-
Encoding::Pointer(&Encoding::C_U_LONG),
63-
Encoding::Array(5, &Encoding::C_U_LONG),
62+
Encoding::Pointer(&Encoding::C_ULONG),
63+
Encoding::Array(5, &Encoding::C_ULONG),
6464
],
6565
);
6666
}

tests/src/test_encode_utils.rs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -169,9 +169,9 @@ assert_inner!(enc ENCODING_LONG => Encoding::C_LONG);
169169
assert_inner!(enc ENCODING_LONG_POINTER => Encoding::Pointer(&Encoding::C_LONG));
170170
assert_inner!(str ENCODING_LONG_ATOMIC => format!("A{}", Encoding::C_LONG));
171171

172-
assert_inner!(enc ENCODING_UNSIGNED_LONG => Encoding::C_U_LONG);
173-
assert_inner!(enc ENCODING_UNSIGNED_LONG_POINTER => Encoding::Pointer(&Encoding::C_U_LONG));
174-
assert_inner!(str ENCODING_UNSIGNED_LONG_ATOMIC => format!("A{}", Encoding::C_U_LONG));
172+
assert_inner!(enc ENCODING_UNSIGNED_LONG => Encoding::C_ULONG);
173+
assert_inner!(enc ENCODING_UNSIGNED_LONG_POINTER => Encoding::Pointer(&Encoding::C_ULONG));
174+
assert_inner!(str ENCODING_UNSIGNED_LONG_ATOMIC => format!("A{}", Encoding::C_ULONG));
175175

176176
// No appropriate Rust types for these:
177177

0 commit comments

Comments
 (0)