[Python-checkins] r81719 - python/branches/py3k-cdecimal/Modules/cdecimal/mpdecimal64.h
stefan.krah
python-checkins at python.org
Sat Jun 5 10:15:47 CEST 2010
Author: stefan.krah
Date: Sat Jun 5 10:15:47 2010
New Revision: 81719
Log:
1) Add constants for IEEE 754 interchange format contexts.
2) Export mpd_setminalloc(), add mpd_ieee_context().
Modified:
python/branches/py3k-cdecimal/Modules/cdecimal/mpdecimal64.h
Modified: python/branches/py3k-cdecimal/Modules/cdecimal/mpdecimal64.h
==============================================================================
--- python/branches/py3k-cdecimal/Modules/cdecimal/mpdecimal64.h (original)
+++ python/branches/py3k-cdecimal/Modules/cdecimal/mpdecimal64.h Sat Jun 5 10:15:47 2010
@@ -138,18 +138,25 @@
/* Official name */
#define MPD_Insufficient_storage MPD_Malloc_error
+/* IEEE 754 interchange format contexts */
+#define MPD_IEEE_CONTEXT_MAX_BITS 512 /* 16*(log2(MPD_MAX_EMAX / 3)-3) */
+#define MPD_DECIMAL32 32
+#define MPD_DECIMAL64 64
+#define MPD_DECIMAL128 128
+
#define MPD_MINALLOC_MIN 2
#define MPD_MINALLOC_MAX 64
extern mpd_ssize_t MPD_MINALLOC;
extern void (* mpd_traphandler)(mpd_context_t *);
+void mpd_setminalloc(mpd_ssize_t n);
void mpd_init(mpd_context_t *ctx, mpd_ssize_t prec);
void mpd_maxcontext(mpd_context_t *ctx);
void mpd_defaultcontext(mpd_context_t *ctx);
void mpd_basiccontext(mpd_context_t *ctx);
-void mpd_extcontext(mpd_context_t *ctx);
+int mpd_ieee_context(mpd_context_t *ctx, int bits);
mpd_ssize_t mpd_getprec(const mpd_context_t *ctx);
mpd_ssize_t mpd_getemax(const mpd_context_t *ctx);
@@ -223,7 +230,7 @@
/* output to a string */
char *mpd_to_sci(const mpd_t *dec, int fmt);
char *mpd_to_eng(const mpd_t *dec, int fmt);
-int mpd_parse_fmt_str(mpd_spec_t *spec, const char *fmt);
+int mpd_parse_fmt_str(mpd_spec_t *spec, const char *fmt, int caps);
char * mpd_qformat_spec(const mpd_t *dec, mpd_spec_t *spec, const mpd_context_t *ctx, uint32_t *status);
char *mpd_qformat(const mpd_t *dec, const char *fmt, const mpd_context_t *ctx, uint32_t *status);
More information about the Python-checkins
mailing list