Skip to content

Commit

Permalink
doc: update doc example on how to retrieve first memory block
Browse files Browse the repository at this point in the history
  • Loading branch information
vthib committed Nov 29, 2023
1 parent 2bdc930 commit cef7f86
Showing 1 changed file with 7 additions and 4 deletions.
11 changes: 7 additions & 4 deletions docs/writingmodules.rst
Original file line number Diff line number Diff line change
Expand Up @@ -657,11 +657,14 @@ checks in your code nevertheless). In those cases you can use the
const uint8_t* block_data;
block = first_memory_block(context);
block_data = block->fetch_data(block)
if (block_data != NULL)
if (block != NULL)
{
..do something with the memory block
block_data = block->fetch_data(block)
if (block_data != NULL)
{
..do something with the memory block
}
}
}
Expand Down

0 comments on commit cef7f86

Please sign in to comment.