Skip to content

Support loading all integer, float, and char types - #36

Merged
tuckermcclure merged 2 commits into
mainfrom
tucker/integers
Aug 24, 2026
Merged

tuckermcclure merged 2 commits into
mainfrom
tucker/integers

Conversation

@tuckermcclure

Copy link
Copy Markdown
Member

Implemented scalar loading improvements on tucker/integers.

Changes in PortableStructs.jl:

  • All Real values can convert to any concrete Integer target.
  • All Real values can convert to any AbstractFloat target.
  • Julia’s normal range and exactness checks remain in effect.
  • Char loading now explicitly converts the single decoded character to the requested character type.
  • Fixed the misplaced kwargs... semicolon in the old integer method.

Coverage includes signed and unsigned widths, Int128, UInt128, BigInt, Bool, Float16, Float32, Float64, BigFloat, and Unicode Char. The complete test suite passes.

One existing serialization limitation remains: very large signed Int128/BigInt numeric scalars can exceed YAML.jl’s Int64 parser, and BigFloat output may lose precision through Float64. Quoted integer strings load correctly; serialization behavior was left unchanged as requested.

@tuckermcclure tuckermcclure linked an issue Aug 22, 2026 that may be closed by this pull request
@tuckermcclure
tuckermcclure merged commit 32f74ce into main Aug 24, 2026
6 checks passed
@tuckermcclure
tuckermcclure deleted the tucker/integers branch August 24, 2026 16:07
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Support other integer types (only Int64 works today)

2 participants