Skip to content

Commit

Permalink
Update XML backend to support read/write
Browse files Browse the repository at this point in the history
This is primarily meant for testing like the XML backend itself. These
changes implement the read and write backend functions and maintain
state within an in-memory XML string.

Signed-off-by: Travis F. Collins <[email protected]>
  • Loading branch information
tfcollins committed Aug 21, 2024
1 parent 3dba184 commit de18698
Show file tree
Hide file tree
Showing 3 changed files with 686 additions and 397 deletions.
2 changes: 2 additions & 0 deletions context.c
Original file line number Diff line number Diff line change
Expand Up @@ -296,6 +296,8 @@ void iio_context_destroy(struct iio_context *ctx)
free(ctx->description);
free(ctx->git_tag);
free(ctx->pdata);
if (ctx->xml_raw)
free(ctx->xml_raw);
free(ctx);

if (WITH_MODULES && lib)
Expand Down
2 changes: 2 additions & 0 deletions iio-private.h
Original file line number Diff line number Diff line change
Expand Up @@ -98,6 +98,8 @@ struct iio_context {
struct iio_context_params params;

struct iio_module *lib;

char *xml_raw;
};

struct iio_channel {
Expand Down
Loading

0 comments on commit de18698

Please sign in to comment.