Commit f6ae1ff16a2b874b8c536c6c797986513a39134d
1 parent
8c1cde4e
Rename to qpdf_oh_free_buffer
Showing
5 changed files
with
13 additions
and
8 deletions
ChangeLog
include/qpdf/qpdf-c.h
| ... | ... | @@ -929,11 +929,11 @@ extern "C" { |
| 929 | 929 | |
| 930 | 930 | /* Call free to release the buffer allocated with malloc. This function can be used to free |
| 931 | 931 | * buffers that were dynamically allocated by qpdf functions such as qpdf_oh_get_stream_data |
| 932 | - * or qpdf_oh_get_page_content_data. The caller is responsible for calling qpdf_free_buffer | |
| 932 | + * or qpdf_oh_get_page_content_data. The caller is responsible for calling qpdf_oh_free_buffer | |
| 933 | 933 | * to manage memory properly and avoid memory leaks. |
| 934 | 934 | */ |
| 935 | 935 | QPDF_DLL |
| 936 | - void qpdf_free_buffer(unsigned char** bufp); | |
| 936 | + void qpdf_oh_free_buffer(unsigned char** bufp); | |
| 937 | 937 | |
| 938 | 938 | /* The data pointed to by bufp will be copied by the library. It does not need to remain valid |
| 939 | 939 | * after the call returns. | ... | ... |
libqpdf/qpdf-c.cc
| ... | ... | @@ -1772,9 +1772,9 @@ qpdf_oh_get_page_content_data(qpdf_data qpdf, qpdf_oh page_oh, unsigned char** b |
| 1772 | 1772 | } |
| 1773 | 1773 | |
| 1774 | 1774 | void |
| 1775 | -qpdf_free_buffer(unsigned char** bufp) | |
| 1775 | +qpdf_oh_free_buffer(unsigned char** bufp) | |
| 1776 | 1776 | { |
| 1777 | - QTC::TC("qpdf", "qpdf-c called qpdf_free_buffer"); | |
| 1777 | + QTC::TC("qpdf", "qpdf-c called qpdf_oh_free_buffer"); | |
| 1778 | 1778 | if (bufp && *bufp) { |
| 1779 | 1779 | free(*bufp); |
| 1780 | 1780 | *bufp = nullptr; | ... | ... |
qpdf/qpdf-ctest.c
| ... | ... | @@ -1151,7 +1151,7 @@ test38(char const* infile, char const* password, char const* outfile, char const |
| 1151 | 1151 | assert(qpdf_oh_get_stream_data(qpdf, stream, qpdf_dl_none, 0, &buf, &len) == 0); |
| 1152 | 1152 | assert(len == 53); |
| 1153 | 1153 | assert(((int)buf[0] == 'x') && ((int)buf[1] == 0234)); |
| 1154 | - qpdf_free_buffer(&buf); | |
| 1154 | + qpdf_oh_free_buffer(&buf); | |
| 1155 | 1155 | |
| 1156 | 1156 | /* Test whether filterable */ |
| 1157 | 1157 | QPDF_BOOL filtered = QPDF_FALSE; |
| ... | ... | @@ -1169,8 +1169,8 @@ test38(char const* infile, char const* password, char const* outfile, char const |
| 1169 | 1169 | assert(qpdf_oh_get_page_content_data(qpdf, page2, &buf2, &len) == 0); |
| 1170 | 1170 | assert(len == 47); |
| 1171 | 1171 | assert(memcmp(buf, buf2, len) == 0); |
| 1172 | - qpdf_free_buffer(&buf); | |
| 1173 | - qpdf_free_buffer(&buf2); | |
| 1172 | + qpdf_oh_free_buffer(&buf); | |
| 1173 | + qpdf_oh_free_buffer(&buf2); | |
| 1174 | 1174 | |
| 1175 | 1175 | /* errors */ |
| 1176 | 1176 | printf("page content on broken page\n"); | ... | ... |
qpdf/qpdf.testcov
| ... | ... | @@ -626,7 +626,7 @@ qpdf-c stream data filtered set 1 |
| 626 | 626 | qpdf-c stream data buf set 1 |
| 627 | 627 | qpdf-c called qpdf_oh_get_page_content_data 0 |
| 628 | 628 | qpdf-c called qpdf_oh_replace_stream_data 0 |
| 629 | -qpdf-c called qpdf_free_buffer 0 | |
| 629 | +qpdf-c called qpdf_oh_free_buffer 0 | |
| 630 | 630 | qpdf-c silence oh errors 0 |
| 631 | 631 | qpdf-c called qpdf_oh_get_binary_string_value 0 |
| 632 | 632 | qpdf-c called qpdf_oh_get_binary_utf8_value 0 | ... | ... |