Lines Matching refs:nwords
151 /* Allocate a new decimal with a coefficient of length 'nwords'. In case
154 mpd_qnew_size(mpd_ssize_t nwords)
158 nwords = (nwords < MPD_MINALLOC) ? MPD_MINALLOC : nwords;
165 result->data = mpd_alloc(nwords, sizeof *result->data);
175 result->alloc = nwords;
204 * Assumption: 'nwords' >= result->alloc.
211 mpd_switch_to_dyn(mpd_t *result, mpd_ssize_t nwords, uint32_t *status)
215 assert(nwords >= result->alloc);
217 result->data = mpd_alloc(nwords, sizeof *result->data);
228 result->alloc = nwords;
240 mpd_switch_to_dyn_zero(mpd_t *result, mpd_ssize_t nwords, uint32_t *status)
244 result->data = mpd_calloc(nwords, sizeof *result->data);
254 result->alloc = nwords;
262 * Resize the coefficient to length 'nwords':
263 * Case nwords > result->alloc:
268 * Case nwords < result->alloc:
275 mpd_realloc_dyn(mpd_t *result, mpd_ssize_t nwords, uint32_t *status)
279 result->data = mpd_realloc(result->data, nwords, sizeof *result->data, &err);
281 result->alloc = nwords;
283 else if (nwords > result->alloc) {
296 * Assumption: 'nwords' >= result->alloc.
304 mpd_switch_to_dyn_cxx(mpd_t *result, mpd_ssize_t nwords)
306 assert(nwords >= result->alloc);
308 mpd_uint_t *data = mpd_alloc(nwords, sizeof *result->data);
315 result->alloc = nwords;
322 * Resize the coefficient to length 'nwords':
323 * Case nwords > result->alloc:
328 * Case nwords < result->alloc:
335 mpd_realloc_dyn_cxx(mpd_t *result, mpd_ssize_t nwords)
339 mpd_uint_t *p = mpd_realloc(result->data, nwords, sizeof *result->data, &err);
342 result->alloc = nwords;
344 else if (nwords > result->alloc) {