mirror of
git://sourceware.org/git/lvm2.git
synced 2024-12-21 13:34:40 +03:00
API change - support more const arg
As dm_report_field_string() doesn't modify content of data pointer, it can be marked as const. It's slight API change - but doesn't require any change on the user side and supports wider range of arguments without const casting. (i.e. we may use as paramater const lv struct this way: &lv->name)
This commit is contained in:
parent
4ebc6404ee
commit
2f321615f2
@ -1,5 +1,6 @@
|
|||||||
Version 1.02.64 -
|
Version 1.02.64 -
|
||||||
===================================
|
===================================
|
||||||
|
Change dm_report_field_string() API to accept const char *const *data.
|
||||||
|
|
||||||
Version 1.02.63 - 9th February 2011
|
Version 1.02.63 - 9th February 2011
|
||||||
===================================
|
===================================
|
||||||
|
@ -1123,7 +1123,7 @@ int dm_report_set_output_field_name_prefix(struct dm_report *rh,
|
|||||||
* They take care of allocating copies of the data.
|
* They take care of allocating copies of the data.
|
||||||
*/
|
*/
|
||||||
int dm_report_field_string(struct dm_report *rh, struct dm_report_field *field,
|
int dm_report_field_string(struct dm_report *rh, struct dm_report_field *field,
|
||||||
const char **data);
|
const char *const *data);
|
||||||
int dm_report_field_int32(struct dm_report *rh, struct dm_report_field *field,
|
int dm_report_field_int32(struct dm_report *rh, struct dm_report_field *field,
|
||||||
const int32_t *data);
|
const int32_t *data);
|
||||||
int dm_report_field_uint32(struct dm_report *rh, struct dm_report_field *field,
|
int dm_report_field_uint32(struct dm_report *rh, struct dm_report_field *field,
|
||||||
|
@ -102,7 +102,7 @@ static const struct dm_report_object_type *_find_type(struct dm_report *rh,
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
int dm_report_field_string(struct dm_report *rh,
|
int dm_report_field_string(struct dm_report *rh,
|
||||||
struct dm_report_field *field, const char **data)
|
struct dm_report_field *field, const char *const *data)
|
||||||
{
|
{
|
||||||
char *repstr;
|
char *repstr;
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user