Differences From Artifact [b60c2c0014]:
- File src/OFDate.m — part of check-in [d0ae3bfd6c] at 2020-10-25 23:33:09 on branch trunk — Add of_{malloc,calloc,realloc,free} (user: js, size: 20093) [annotate] [blame] [check-ins using]
To Artifact [cf1b1da641]:
- File
src/OFDate.m
— part of check-in
[3d8286feee]
at
2020-11-04 23:18:25
on branch trunk
— Remove of_free()
While it makes sense to wrap malloc and calloc to replace the error
checking with exceptions, it does not make sense to wrap free. (user: js, size: 20087) [annotate] [blame] [check-ins using] [more...]
︙ | ︙ | |||
790 791 792 793 794 795 796 | if (wcsftime(buffer, pageSize / sizeof(wchar_t), format.UTF16String, &tm) == 0) @throw [OFOutOfRangeException exception]; ret = [OFString stringWithUTF16String: buffer]; #endif } @finally { | | | 790 791 792 793 794 795 796 797 798 799 800 801 802 803 804 | if (wcsftime(buffer, pageSize / sizeof(wchar_t), format.UTF16String, &tm) == 0) @throw [OFOutOfRangeException exception]; ret = [OFString stringWithUTF16String: buffer]; #endif } @finally { free(buffer); } return ret; } - (OFString *)localDateStringWithFormat: (OFConstantString *)format { |
︙ | ︙ | |||
850 851 852 853 854 855 856 | if (wcsftime(buffer, pageSize / sizeof(wchar_t), format.UTF16String, &tm) == 0) @throw [OFOutOfRangeException exception]; ret = [OFString stringWithUTF16String: buffer]; #endif } @finally { | | | 850 851 852 853 854 855 856 857 858 859 860 861 862 863 864 | if (wcsftime(buffer, pageSize / sizeof(wchar_t), format.UTF16String, &tm) == 0) @throw [OFOutOfRangeException exception]; ret = [OFString stringWithUTF16String: buffer]; #endif } @finally { free(buffer); } return ret; } - (OFDate *)earlierDate: (OFDate *)otherDate { |
︙ | ︙ |