mirror of
https://gitlab.freedesktop.org/cairo/cairo.git
synced 2026-01-04 21:30:19 +01:00
More typo fixes
This commit is contained in:
parent
73cde7a0f6
commit
81c848c839
1 changed files with 11 additions and 11 deletions
|
|
@ -67,7 +67,7 @@
|
|||
* @a: number of elements to allocate
|
||||
* @size: size of each element
|
||||
*
|
||||
* Allocates @n*@size memory using _cairo_malloc(), taking care to not
|
||||
* Allocates @a*@size memory using _cairo_malloc(), taking care to not
|
||||
* overflow when doing the multiplication. Behaves much like
|
||||
* calloc(), except that the returned memory is not set to zero.
|
||||
* The memory should be freed using free().
|
||||
|
|
@ -89,7 +89,7 @@
|
|||
* @a: number of elements to allocate
|
||||
* @size: size of each element
|
||||
*
|
||||
* Reallocates @ptr a block of @n*@size memory using realloc(), taking
|
||||
* Reallocates @ptr a block of @a*@size memory using realloc(), taking
|
||||
* care to not overflow when doing the multiplication. The memory
|
||||
* should be freed using free().
|
||||
*
|
||||
|
|
@ -111,7 +111,7 @@
|
|||
* @b: second factor of number of elements to allocate
|
||||
* @size: size of each element
|
||||
*
|
||||
* Allocates @n*@b*@size memory using _cairo_malloc(), taking care to not
|
||||
* Allocates @a*@b*@size memory using _cairo_malloc(), taking care to not
|
||||
* overflow when doing the multiplication. Behaves like
|
||||
* _cairo_malloc_ab(). The memory should be freed using free().
|
||||
*
|
||||
|
|
@ -129,21 +129,21 @@
|
|||
|
||||
/**
|
||||
* _cairo_malloc_ab_plus_c:
|
||||
* @n: number of elements to allocate
|
||||
* @a: number of elements to allocate
|
||||
* @size: size of each element
|
||||
* @k: additional size to allocate
|
||||
* @c: additional size to allocate
|
||||
*
|
||||
* Allocates @n*@ksize+@k memory using _cairo_malloc(), taking care to not
|
||||
* overflow when doing the arithmetic. Behaves like
|
||||
* Allocates @a*@size+@c memory using _cairo_malloc(), taking care to not
|
||||
* overflow when doing the arithmetic. Behaves similar to
|
||||
* _cairo_malloc_ab(). The memory should be freed using free().
|
||||
*
|
||||
* Return value: A pointer to the newly allocated memory, or %NULL in
|
||||
* case of malloc() failure or overflow.
|
||||
*/
|
||||
|
||||
#define _cairo_malloc_ab_plus_c(n, size, k) \
|
||||
((size) && (unsigned) (n) >= INT32_MAX / (unsigned) (size) ? NULL : \
|
||||
(unsigned) (k) >= INT32_MAX - (unsigned) (n) * (unsigned) (size) ? NULL : \
|
||||
_cairo_malloc((unsigned) (n) * (unsigned) (size) + (unsigned) (k)))
|
||||
#define _cairo_malloc_ab_plus_c(a, size, c) \
|
||||
((size) && (unsigned) (a) >= INT32_MAX / (unsigned) (size) ? NULL : \
|
||||
(unsigned) (c) >= INT32_MAX - (unsigned) (a) * (unsigned) (size) ? NULL : \
|
||||
_cairo_malloc((unsigned) (a) * (unsigned) (size) + (unsigned) (c)))
|
||||
|
||||
#endif /* CAIRO_MALLOC_PRIVATE_H */
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue