Differences From Artifact [fa7289510f]:
- File
src/OFObject.h
— part of check-in
[a2e849c681]
at
2017-10-30 00:23:35
on branch trunk
— Add class properties where appropriate
This improves Swift compatibility. (user: js, size: 35160) [annotate] [blame] [check-ins using]
To Artifact [288587471e]:
- File src/OFObject.h — part of check-in [7c79db860d] at 2017-11-05 02:58:00 on branch trunk — Add OF_WARN_UNUSED_RESULT (user: js, size: 35248) [annotate] [blame] [check-ins using]
︙ | ︙ | |||
665 666 667 668 669 670 671 | * * It will be freed automatically when the object is deallocated. * * @param size The size of the memory to allocate * @return A pointer to the allocated memory. May return NULL if the specified * size is 0. */ | | | | | | 665 666 667 668 669 670 671 672 673 674 675 676 677 678 679 680 681 682 683 684 685 686 687 688 689 690 691 692 693 694 695 696 697 698 699 700 701 702 703 704 705 706 707 708 709 710 711 712 713 714 715 716 717 718 719 720 721 722 | * * It will be freed automatically when the object is deallocated. * * @param size The size of the memory to allocate * @return A pointer to the allocated memory. May return NULL if the specified * size is 0. */ - (nullable void *)allocMemoryWithSize: (size_t)size OF_WARN_UNUSED_RESULT; /*! * @brief Allocates memory for the specified number of items and stores it in * the object's memory pool. * * It will be freed automatically when the object is deallocated. * * @param size The size of each item to allocate * @param count The number of items to allocate * @return A pointer to the allocated memory. May return NULL if the specified * size or count is 0. */ - (nullable void *)allocMemoryWithSize: (size_t)size count: (size_t)count OF_WARN_UNUSED_RESULT; /*! * @brief Resizes memory in the object's memory pool to the specified size. * * If the pointer is NULL, this is equivalent to allocating memory. * If the size is 0, this is equivalent to freeing memory. * * @param pointer A pointer to the already allocated memory * @param size The new size for the memory chunk * @return A pointer to the resized memory chunk */ - (nullable void *)resizeMemory: (nullable void *)pointer size: (size_t)size OF_WARN_UNUSED_RESULT; /*! * @brief Resizes memory in the object's memory pool to the specific number of * items of the specified size. * * If the pointer is NULL, this is equivalent to allocating memory. * If the size or number of items is 0, this is equivalent to freeing memory. * * @param pointer A pointer to the already allocated memory * @param size The size of each item to resize to * @param count The number of items to resize to * @return A pointer to the resized memory chunk */ - (nullable void *)resizeMemory: (nullable void *)pointer size: (size_t)size count: (size_t)count OF_WARN_UNUSED_RESULT; /*! * @brief Frees allocated memory and removes it from the object's memory pool. * * Does nothing if the pointer is NULL. * * @param pointer A pointer to the allocated memory |
︙ | ︙ |