Skip to content

Commit

Permalink
Adds definitions needed for uformattable.h.
Browse files Browse the repository at this point in the history
This adds the changes needed to register the new `rust_icu_formattable`
crate.  Actual implementation will be in followup commits.

Issue #140
  • Loading branch information
filmil committed Jun 23, 2020
1 parent 1011dad commit 41c86fa
Show file tree
Hide file tree
Showing 12 changed files with 438 additions and 0 deletions.
1 change: 1 addition & 0 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ members = [
"rust_icu_udat",
"rust_icu_udata",
"rust_icu_uenum",
"rust_icu_uformattable",
"rust_icu_ulistformatter",
"rust_icu_uloc",
"rust_icu_umsg",
Expand Down
2 changes: 2 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -133,6 +133,7 @@ publish:
$(call publish,rust_icu_umsg)
$(call publish,rust_icu_ulistformatter)
$(call publish,rust_icu_upluralrules)
$(call publish,rust_icu_uformattable)
$(call publish,rust_icu)

# A helper to up-rev the cargo crate versions.
Expand Down Expand Up @@ -164,6 +165,7 @@ uprev:
$(call uprev,rust_icu_upluralrules)
$(call uprev,rust_icu_ustring)
$(call uprev,rust_icu_utext)
$(call uprev,rust_icu_uformattable)

cov:
./build/showprogress.sh
67 changes: 67 additions & 0 deletions rust_icu_sys/bindgen/lib_63.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2272,6 +2272,73 @@ fn bindgen_test_layout_UFieldPosition() {
}
#[repr(u32)]
#[derive(Debug, Copy, Clone, PartialEq, Eq, Hash, PartialOrd)]
pub enum UFormattableType {
UFMT_DATE = 0,
UFMT_DOUBLE = 1,
UFMT_LONG = 2,
UFMT_STRING = 3,
UFMT_ARRAY = 4,
UFMT_INT64 = 5,
UFMT_OBJECT = 6,
UFMT_COUNT = 7,
}
pub type UFormattable = *mut ::std::os::raw::c_void;
extern "C" {
pub fn ufmt_open_63(status: *mut UErrorCode) -> *mut UFormattable;
}
extern "C" {
pub fn ufmt_close_63(fmt: *mut UFormattable);
}
extern "C" {
pub fn ufmt_getType_63(fmt: *const UFormattable, status: *mut UErrorCode) -> UFormattableType;
}
extern "C" {
pub fn ufmt_isNumeric_63(fmt: *const UFormattable) -> UBool;
}
extern "C" {
pub fn ufmt_getDate_63(fmt: *const UFormattable, status: *mut UErrorCode) -> UDate;
}
extern "C" {
pub fn ufmt_getDouble_63(fmt: *mut UFormattable, status: *mut UErrorCode) -> f64;
}
extern "C" {
pub fn ufmt_getLong_63(fmt: *mut UFormattable, status: *mut UErrorCode) -> i32;
}
extern "C" {
pub fn ufmt_getInt64_63(fmt: *mut UFormattable, status: *mut UErrorCode) -> i64;
}
extern "C" {
pub fn ufmt_getObject_63(
fmt: *const UFormattable,
status: *mut UErrorCode,
) -> *const ::std::os::raw::c_void;
}
extern "C" {
pub fn ufmt_getUChars_63(
fmt: *mut UFormattable,
len: *mut i32,
status: *mut UErrorCode,
) -> *const UChar;
}
extern "C" {
pub fn ufmt_getArrayLength_63(fmt: *const UFormattable, status: *mut UErrorCode) -> i32;
}
extern "C" {
pub fn ufmt_getArrayItemByIndex_63(
fmt: *mut UFormattable,
n: i32,
status: *mut UErrorCode,
) -> *mut UFormattable;
}
extern "C" {
pub fn ufmt_getDecNumChars_63(
fmt: *mut UFormattable,
len: *mut i32,
status: *mut UErrorCode,
) -> *const ::std::os::raw::c_char;
}
#[repr(u32)]
#[derive(Debug, Copy, Clone, PartialEq, Eq, Hash, PartialOrd)]
pub enum UDisplayContextType {
UDISPCTX_TYPE_DIALECT_HANDLING = 0,
UDISPCTX_TYPE_CAPITALIZATION = 1,
Expand Down
67 changes: 67 additions & 0 deletions rust_icu_sys/bindgen/lib_64.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2272,6 +2272,73 @@ fn bindgen_test_layout_UFieldPosition() {
}
#[repr(u32)]
#[derive(Debug, Copy, Clone, PartialEq, Eq, Hash, PartialOrd)]
pub enum UFormattableType {
UFMT_DATE = 0,
UFMT_DOUBLE = 1,
UFMT_LONG = 2,
UFMT_STRING = 3,
UFMT_ARRAY = 4,
UFMT_INT64 = 5,
UFMT_OBJECT = 6,
UFMT_COUNT = 7,
}
pub type UFormattable = *mut ::std::os::raw::c_void;
extern "C" {
pub fn ufmt_open_64(status: *mut UErrorCode) -> *mut UFormattable;
}
extern "C" {
pub fn ufmt_close_64(fmt: *mut UFormattable);
}
extern "C" {
pub fn ufmt_getType_64(fmt: *const UFormattable, status: *mut UErrorCode) -> UFormattableType;
}
extern "C" {
pub fn ufmt_isNumeric_64(fmt: *const UFormattable) -> UBool;
}
extern "C" {
pub fn ufmt_getDate_64(fmt: *const UFormattable, status: *mut UErrorCode) -> UDate;
}
extern "C" {
pub fn ufmt_getDouble_64(fmt: *mut UFormattable, status: *mut UErrorCode) -> f64;
}
extern "C" {
pub fn ufmt_getLong_64(fmt: *mut UFormattable, status: *mut UErrorCode) -> i32;
}
extern "C" {
pub fn ufmt_getInt64_64(fmt: *mut UFormattable, status: *mut UErrorCode) -> i64;
}
extern "C" {
pub fn ufmt_getObject_64(
fmt: *const UFormattable,
status: *mut UErrorCode,
) -> *const ::std::os::raw::c_void;
}
extern "C" {
pub fn ufmt_getUChars_64(
fmt: *mut UFormattable,
len: *mut i32,
status: *mut UErrorCode,
) -> *const UChar;
}
extern "C" {
pub fn ufmt_getArrayLength_64(fmt: *const UFormattable, status: *mut UErrorCode) -> i32;
}
extern "C" {
pub fn ufmt_getArrayItemByIndex_64(
fmt: *mut UFormattable,
n: i32,
status: *mut UErrorCode,
) -> *mut UFormattable;
}
extern "C" {
pub fn ufmt_getDecNumChars_64(
fmt: *mut UFormattable,
len: *mut i32,
status: *mut UErrorCode,
) -> *const ::std::os::raw::c_char;
}
#[repr(u32)]
#[derive(Debug, Copy, Clone, PartialEq, Eq, Hash, PartialOrd)]
pub enum UDisplayContextType {
UDISPCTX_TYPE_DIALECT_HANDLING = 0,
UDISPCTX_TYPE_CAPITALIZATION = 1,
Expand Down
67 changes: 67 additions & 0 deletions rust_icu_sys/bindgen/lib_65.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2293,6 +2293,73 @@ fn bindgen_test_layout_UFieldPosition() {
}
#[repr(u32)]
#[derive(Debug, Copy, Clone, PartialEq, Eq, Hash, PartialOrd)]
pub enum UFormattableType {
UFMT_DATE = 0,
UFMT_DOUBLE = 1,
UFMT_LONG = 2,
UFMT_STRING = 3,
UFMT_ARRAY = 4,
UFMT_INT64 = 5,
UFMT_OBJECT = 6,
UFMT_COUNT = 7,
}
pub type UFormattable = *mut ::std::os::raw::c_void;
extern "C" {
pub fn ufmt_open_65(status: *mut UErrorCode) -> *mut UFormattable;
}
extern "C" {
pub fn ufmt_close_65(fmt: *mut UFormattable);
}
extern "C" {
pub fn ufmt_getType_65(fmt: *const UFormattable, status: *mut UErrorCode) -> UFormattableType;
}
extern "C" {
pub fn ufmt_isNumeric_65(fmt: *const UFormattable) -> UBool;
}
extern "C" {
pub fn ufmt_getDate_65(fmt: *const UFormattable, status: *mut UErrorCode) -> UDate;
}
extern "C" {
pub fn ufmt_getDouble_65(fmt: *mut UFormattable, status: *mut UErrorCode) -> f64;
}
extern "C" {
pub fn ufmt_getLong_65(fmt: *mut UFormattable, status: *mut UErrorCode) -> i32;
}
extern "C" {
pub fn ufmt_getInt64_65(fmt: *mut UFormattable, status: *mut UErrorCode) -> i64;
}
extern "C" {
pub fn ufmt_getObject_65(
fmt: *const UFormattable,
status: *mut UErrorCode,
) -> *const ::std::os::raw::c_void;
}
extern "C" {
pub fn ufmt_getUChars_65(
fmt: *mut UFormattable,
len: *mut i32,
status: *mut UErrorCode,
) -> *const UChar;
}
extern "C" {
pub fn ufmt_getArrayLength_65(fmt: *const UFormattable, status: *mut UErrorCode) -> i32;
}
extern "C" {
pub fn ufmt_getArrayItemByIndex_65(
fmt: *mut UFormattable,
n: i32,
status: *mut UErrorCode,
) -> *mut UFormattable;
}
extern "C" {
pub fn ufmt_getDecNumChars_65(
fmt: *mut UFormattable,
len: *mut i32,
status: *mut UErrorCode,
) -> *const ::std::os::raw::c_char;
}
#[repr(u32)]
#[derive(Debug, Copy, Clone, PartialEq, Eq, Hash, PartialOrd)]
pub enum UDisplayContextType {
UDISPCTX_TYPE_DIALECT_HANDLING = 0,
UDISPCTX_TYPE_CAPITALIZATION = 1,
Expand Down
67 changes: 67 additions & 0 deletions rust_icu_sys/bindgen/lib_66.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2293,6 +2293,73 @@ fn bindgen_test_layout_UFieldPosition() {
}
#[repr(u32)]
#[derive(Debug, Copy, Clone, PartialEq, Eq, Hash, PartialOrd)]
pub enum UFormattableType {
UFMT_DATE = 0,
UFMT_DOUBLE = 1,
UFMT_LONG = 2,
UFMT_STRING = 3,
UFMT_ARRAY = 4,
UFMT_INT64 = 5,
UFMT_OBJECT = 6,
UFMT_COUNT = 7,
}
pub type UFormattable = *mut ::std::os::raw::c_void;
extern "C" {
pub fn ufmt_open_66(status: *mut UErrorCode) -> *mut UFormattable;
}
extern "C" {
pub fn ufmt_close_66(fmt: *mut UFormattable);
}
extern "C" {
pub fn ufmt_getType_66(fmt: *const UFormattable, status: *mut UErrorCode) -> UFormattableType;
}
extern "C" {
pub fn ufmt_isNumeric_66(fmt: *const UFormattable) -> UBool;
}
extern "C" {
pub fn ufmt_getDate_66(fmt: *const UFormattable, status: *mut UErrorCode) -> UDate;
}
extern "C" {
pub fn ufmt_getDouble_66(fmt: *mut UFormattable, status: *mut UErrorCode) -> f64;
}
extern "C" {
pub fn ufmt_getLong_66(fmt: *mut UFormattable, status: *mut UErrorCode) -> i32;
}
extern "C" {
pub fn ufmt_getInt64_66(fmt: *mut UFormattable, status: *mut UErrorCode) -> i64;
}
extern "C" {
pub fn ufmt_getObject_66(
fmt: *const UFormattable,
status: *mut UErrorCode,
) -> *const ::std::os::raw::c_void;
}
extern "C" {
pub fn ufmt_getUChars_66(
fmt: *mut UFormattable,
len: *mut i32,
status: *mut UErrorCode,
) -> *const UChar;
}
extern "C" {
pub fn ufmt_getArrayLength_66(fmt: *const UFormattable, status: *mut UErrorCode) -> i32;
}
extern "C" {
pub fn ufmt_getArrayItemByIndex_66(
fmt: *mut UFormattable,
n: i32,
status: *mut UErrorCode,
) -> *mut UFormattable;
}
extern "C" {
pub fn ufmt_getDecNumChars_66(
fmt: *mut UFormattable,
len: *mut i32,
status: *mut UErrorCode,
) -> *const ::std::os::raw::c_char;
}
#[repr(u32)]
#[derive(Debug, Copy, Clone, PartialEq, Eq, Hash, PartialOrd)]
pub enum UDisplayContextType {
UDISPCTX_TYPE_DIALECT_HANDLING = 0,
UDISPCTX_TYPE_CAPITALIZATION = 1,
Expand Down
67 changes: 67 additions & 0 deletions rust_icu_sys/bindgen/lib_67.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2293,6 +2293,73 @@ fn bindgen_test_layout_UFieldPosition() {
}
#[repr(u32)]
#[derive(Debug, Copy, Clone, PartialEq, Eq, Hash, PartialOrd)]
pub enum UFormattableType {
UFMT_DATE = 0,
UFMT_DOUBLE = 1,
UFMT_LONG = 2,
UFMT_STRING = 3,
UFMT_ARRAY = 4,
UFMT_INT64 = 5,
UFMT_OBJECT = 6,
UFMT_COUNT = 7,
}
pub type UFormattable = *mut ::std::os::raw::c_void;
extern "C" {
pub fn ufmt_open_67(status: *mut UErrorCode) -> *mut UFormattable;
}
extern "C" {
pub fn ufmt_close_67(fmt: *mut UFormattable);
}
extern "C" {
pub fn ufmt_getType_67(fmt: *const UFormattable, status: *mut UErrorCode) -> UFormattableType;
}
extern "C" {
pub fn ufmt_isNumeric_67(fmt: *const UFormattable) -> UBool;
}
extern "C" {
pub fn ufmt_getDate_67(fmt: *const UFormattable, status: *mut UErrorCode) -> UDate;
}
extern "C" {
pub fn ufmt_getDouble_67(fmt: *mut UFormattable, status: *mut UErrorCode) -> f64;
}
extern "C" {
pub fn ufmt_getLong_67(fmt: *mut UFormattable, status: *mut UErrorCode) -> i32;
}
extern "C" {
pub fn ufmt_getInt64_67(fmt: *mut UFormattable, status: *mut UErrorCode) -> i64;
}
extern "C" {
pub fn ufmt_getObject_67(
fmt: *const UFormattable,
status: *mut UErrorCode,
) -> *const ::std::os::raw::c_void;
}
extern "C" {
pub fn ufmt_getUChars_67(
fmt: *mut UFormattable,
len: *mut i32,
status: *mut UErrorCode,
) -> *const UChar;
}
extern "C" {
pub fn ufmt_getArrayLength_67(fmt: *const UFormattable, status: *mut UErrorCode) -> i32;
}
extern "C" {
pub fn ufmt_getArrayItemByIndex_67(
fmt: *mut UFormattable,
n: i32,
status: *mut UErrorCode,
) -> *mut UFormattable;
}
extern "C" {
pub fn ufmt_getDecNumChars_67(
fmt: *mut UFormattable,
len: *mut i32,
status: *mut UErrorCode,
) -> *const ::std::os::raw::c_char;
}
#[repr(u32)]
#[derive(Debug, Copy, Clone, PartialEq, Eq, Hash, PartialOrd)]
pub enum UDisplayContextType {
UDISPCTX_TYPE_DIALECT_HANDLING = 0,
UDISPCTX_TYPE_CAPITALIZATION = 1,
Expand Down
Loading

0 comments on commit 41c86fa

Please sign in to comment.