Skip to content

Commit

Permalink
Made write_comment() string const.
Browse files Browse the repository at this point in the history
  • Loading branch information
jmcnamara committed Jan 13, 2020
1 parent 2849813 commit 9be5328
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 4 deletions.
5 changes: 3 additions & 2 deletions include/xlsxwriter/worksheet.h
Original file line number Diff line number Diff line change
Expand Up @@ -1713,7 +1713,8 @@ lxw_error worksheet_write_rich_string(lxw_worksheet *worksheet,
*
*/
lxw_error worksheet_write_comment(lxw_worksheet *worksheet,
lxw_row_t row, lxw_col_t col, char *string);
lxw_row_t row, lxw_col_t col,
const char *string);

/**
* @brief Write a comment to a worksheet cell with options.
Expand Down Expand Up @@ -1764,7 +1765,7 @@ lxw_error worksheet_write_comment(lxw_worksheet *worksheet,
*/
lxw_error worksheet_write_comment_opt(lxw_worksheet *worksheet,
lxw_row_t row, lxw_col_t col,
char *string,
const char *string,
lxw_comment_options *options);

/**
Expand Down
5 changes: 3 additions & 2 deletions src/worksheet.c
Original file line number Diff line number Diff line change
Expand Up @@ -5150,7 +5150,7 @@ worksheet_write_rich_string(lxw_worksheet *self,
lxw_error
worksheet_write_comment_opt(lxw_worksheet *self,
lxw_row_t row_num, lxw_col_t col_num,
char *text, lxw_comment_options *options)
const char *text, lxw_comment_options *options)
{
lxw_cell *cell;
lxw_error err;
Expand Down Expand Up @@ -5204,7 +5204,8 @@ worksheet_write_comment_opt(lxw_worksheet *self,
*/
lxw_error
worksheet_write_comment(lxw_worksheet *self,
lxw_row_t row_num, lxw_col_t col_num, char *string)
lxw_row_t row_num, lxw_col_t col_num,
const char *string)
{
return worksheet_write_comment_opt(self, row_num, col_num, string, NULL);
}
Expand Down

0 comments on commit 9be5328

Please sign in to comment.