diff options
Diffstat (limited to 'src/include/gnunet_common.h')
-rw-r--r-- | src/include/gnunet_common.h | 72 |
1 files changed, 0 insertions, 72 deletions
diff --git a/src/include/gnunet_common.h b/src/include/gnunet_common.h index f3ffa49f6..bf5d46856 100644 --- a/src/include/gnunet_common.h +++ b/src/include/gnunet_common.h | |||
@@ -1364,32 +1364,6 @@ GNUNET_is_zero_ (const void *a, | |||
1364 | 1364 | ||
1365 | /** | 1365 | /** |
1366 | * @ingroup memory | 1366 | * @ingroup memory |
1367 | * Allocate a size @a n times @a m array | ||
1368 | * with structs or unions of the given @a type. | ||
1369 | * | ||
1370 | * @param n size of the first dimension | ||
1371 | * @param m size of the second dimension | ||
1372 | * @param type name of the struct or union, i.e. pass 'struct Foo'. | ||
1373 | */ | ||
1374 | #define GNUNET_new_array_2d(n, m, type) \ | ||
1375 | (type **) GNUNET_xnew_array_2d_ (n, m, sizeof(type), __FILE__, __LINE__) | ||
1376 | |||
1377 | /** | ||
1378 | * @ingroup memory | ||
1379 | * Allocate a size @a n times @a m times @a o array | ||
1380 | * with structs or unions of the given @a type. | ||
1381 | * | ||
1382 | * @param n size of the first dimension | ||
1383 | * @param m size of the second dimension | ||
1384 | * @param o size of the third dimension | ||
1385 | * @param type name of the struct or union, i.e. pass 'struct Foo'. | ||
1386 | */ | ||
1387 | #define GNUNET_new_array_3d(n, m, o, type) \ | ||
1388 | (type ***) GNUNET_xnew_array_3d_ (n, m, o, sizeof(type), __FILE__, \ | ||
1389 | __LINE__) | ||
1390 | |||
1391 | /** | ||
1392 | * @ingroup memory | ||
1393 | * Wrapper around malloc. Allocates size bytes of memory. | 1367 | * Wrapper around malloc. Allocates size bytes of memory. |
1394 | * The memory will be zero'ed out. | 1368 | * The memory will be zero'ed out. |
1395 | * | 1369 | * |
@@ -1640,52 +1614,6 @@ GNUNET_xmalloc_ (size_t size, | |||
1640 | 1614 | ||
1641 | 1615 | ||
1642 | /** | 1616 | /** |
1643 | * Allocate memory for a two dimensional array in one block | ||
1644 | * and set up pointers. Aborts if no more memory is available. | ||
1645 | * Don't use GNUNET_xnew_array_2d_ directly. Use the | ||
1646 | * #GNUNET_new_array_2d macro. | ||
1647 | * The memory of the elements will be zero'ed out. | ||
1648 | * | ||
1649 | * @param n size of the first dimension | ||
1650 | * @param m size of the second dimension | ||
1651 | * @param elementSize size of a single element in bytes | ||
1652 | * @param filename where is this call being made (for debugging) | ||
1653 | * @param linenumber line where this call is being made (for debugging) | ||
1654 | * @return allocated memory, never NULL | ||
1655 | */ | ||
1656 | void ** | ||
1657 | GNUNET_xnew_array_2d_ (size_t n, | ||
1658 | size_t m, | ||
1659 | size_t elementSize, | ||
1660 | const char *filename, | ||
1661 | int linenumber); | ||
1662 | |||
1663 | |||
1664 | /** | ||
1665 | * Allocate memory for a three dimensional array in one block | ||
1666 | * and set up pointers. Aborts if no more memory is available. | ||
1667 | * Don't use GNUNET_xnew_array_3d_ directly. Use the | ||
1668 | * #GNUNET_new_array_3d macro. | ||
1669 | * The memory of the elements will be zero'ed out. | ||
1670 | * | ||
1671 | * @param n size of the first dimension | ||
1672 | * @param m size of the second dimension | ||
1673 | * @param o size of the third dimension | ||
1674 | * @param elementSize size of a single element in bytes | ||
1675 | * @param filename where is this call being made (for debugging) | ||
1676 | * @param linenumber line where this call is being made (for debugging) | ||
1677 | * @return allocated memory, never NULL | ||
1678 | */ | ||
1679 | void *** | ||
1680 | GNUNET_xnew_array_3d_ (size_t n, | ||
1681 | size_t m, | ||
1682 | size_t o, | ||
1683 | size_t elementSize, | ||
1684 | const char *filename, | ||
1685 | int linenumber); | ||
1686 | |||
1687 | |||
1688 | /** | ||
1689 | * Allocate and initialize memory. Checks the return value, aborts if no more | 1617 | * Allocate and initialize memory. Checks the return value, aborts if no more |
1690 | * memory is available. Don't use GNUNET_xmemdup_ directly. Use the | 1618 | * memory is available. Don't use GNUNET_xmemdup_ directly. Use the |
1691 | * #GNUNET_memdup macro. | 1619 | * #GNUNET_memdup macro. |