/ Allocate a value block according to type,len, and nb of values. */ /
| 1374 | /* Allocate a value block according to type,len, and nb of values. */ |
| 1375 | /***********************************************************************/ |
| 1376 | PVBLK MBVALS::Allocate(PGLOBAL g, int type, int len, int prec, |
| 1377 | int n, bool sub) |
| 1378 | { |
| 1379 | Mblk.Sub = sub; |
| 1380 | Mblk.Size = n * GetTypeSize(type, len); |
| 1381 | |
| 1382 | if (!PlgDBalloc(g, NULL, Mblk)) { |
| 1383 | snprintf(g->Message, sizeof(g->Message), MSG(ALLOC_ERROR), "MBVALS::Allocate"); |
| 1384 | return NULL; |
| 1385 | } else |
| 1386 | Vblk = AllocValBlock(g, Mblk.Memp, type, n, len, prec, |
| 1387 | TRUE, TRUE, FALSE); |
| 1388 | |
| 1389 | return Vblk; |
| 1390 | } // end of Allocate |
| 1391 | |
| 1392 | /***********************************************************************/ |
| 1393 | /* Reallocate the value block according to the new size. */ |
no test coverage detected