Prism Ruby parser
Loading...
Searching...
No Matches
Data Fields
pm_integer_t Struct Reference

A structure represents an arbitrary-sized integer. More...

#include <integer.h>

Data Fields

uint32_t length
 The number of words in the magnitude, with no leading zero words.
 
bool negative
 Whether or not the integer is negative.
 
union { 
 
   uint32_t   value [2] 
 The words of an integer whose length is at most 2. More...
 
   uint32_t *   values 
 The words of an integer whose length is greater than 2.
 
} words 
 The words of the magnitude.
 

Detailed Description

A structure represents an arbitrary-sized integer.

The magnitude is stored as 32-bit words, least significant first.

Field Documentation

◆ length

uint32_t pm_integer_t::length

The number of words in the magnitude, with no leading zero words.

Zero has no words, so a zeroed pm_integer_t is always positive zero.

◆ value

uint32_t pm_integer_t::value[2]

The words of an integer whose length is at most 2.

Words past the length are zero.

◆ [union]

union { ... } pm_integer_t::words

The words of the magnitude.

Read them through pm_integer_words or pm_integer_uint64_value rather than directly.


The documentation for this struct was generated from the following file: