mirror of
https://github.com/Motorhead1991/qemu.git
synced 2025-12-24 00:18:36 -07:00
libdecnumber: Introduce decNumberIntegralToInt64
Introduce a new conversion function to the libdecnumber library. This function converts a decNumber to a signed 64-bit integer. In order to support 64-bit integers (which may have up to 19 decimal digits), the existing "powers of 10" array is expanded from 10 to 19 entries. Signed-off-by: Tom Musta <tommusta@gmail.com> [agraf: fix 32bit host compile] Signed-off-by: Alexander Graf <agraf@suse.de>
This commit is contained in:
parent
8e706db21e
commit
79af357225
4 changed files with 51 additions and 4 deletions
|
|
@ -122,6 +122,7 @@
|
|||
char * decNumberToEngString(const decNumber *, char *);
|
||||
uint32_t decNumberToUInt32(const decNumber *, decContext *);
|
||||
int32_t decNumberToInt32(const decNumber *, decContext *);
|
||||
int64_t decNumberIntegralToInt64(const decNumber *dn, decContext *set);
|
||||
uint8_t * decNumberGetBCD(const decNumber *, uint8_t *);
|
||||
decNumber * decNumberSetBCD(decNumber *, const uint8_t *, uint32_t);
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue