This repository has been archived by the owner. It is now read-only.

size_t.cr

Crystal mappings to the `size_t` and `usize_t` types.

size_t

The size_t and usize_t types for Crystal, because we for some reason don't already have them.

Installation

  1. Add the dependency to your shard.yml:
dependencies:
  size_t:
    github: Proximyst/size_t.cr
  1. Run shards install

Usage

require "size_t"

# Use the usize_t/USize type:
typeof(Sizes::USize) # (64-bit processor) => UInt64
                     # (32-bit processor) => UInt32

# Use the size_t/ISize type:
typeof(Sizes::ISize) # (64-bit processor) =>  Int64
                     # (32-bit processor) =>  Int32

Contributors

Repository

size_t.cr

Owner
Statistic
  • 0
  • 0
  • 0
  • 0
  • 0
  • over 5 years ago
  • January 5, 2019
License

MIT License

Links
Synced at

Thu, 02 May 2024 13:24:56 GMT

Languages