@@ -659,7 +659,7 @@ checks in your code nevertheless). In those cases you can use the
659
659
block = first_memory_block(context);
660
660
if (block != NULL)
661
661
{
662
- block_data = block->fetch_data (block)
662
+ block_data = yr_fetch_block_data (block)
663
663
664
664
if (block_data != NULL)
665
665
{
@@ -668,23 +668,23 @@ checks in your code nevertheless). In those cases you can use the
668
668
}
669
669
}
670
670
671
- In the previous example you can also see how to use the ``fetch_data `` function.
672
- This function, which is a member of the `` YR_MEMORY_BLOCK `` structure, receives
673
- a pointer to the same block (as a `` self `` or `` this `` pointer) and returns a
674
- pointer to the block's data. Your module doesn't own the memory pointed to by
675
- this pointer, freeing that memory is not your responsibility. However keep in
676
- mind that the pointer is valid only until you ask for the next memory block. As
677
- long as you use the pointer within the scope of a ``foreach_memory_block `` you
678
- are on the safe side. Also take into account that ``fetch_data `` can return a
679
- NULL pointer, your code must be prepared for that case.
671
+ In the previous example you can also see how to use the ``yr_fetch_block_data ``
672
+ function. This function receives a pointer to the same block (as a `` self `` or
673
+ `` this `` pointer) and returns a pointer to the block's data. Your module
674
+ doesn't own the memory pointed to by this pointer, freeing that memory is not
675
+ your responsibility. However keep in mind that the pointer is valid only until
676
+ you ask for the next memory block. As long as you use the pointer within the
677
+ scope of a ``foreach_memory_block `` you are on the safe side. Also take into
678
+ account that ``yr_fetch_block_data `` can return a NULL pointer, your code must
679
+ be prepared for that case.
680
680
681
681
.. code-block :: c
682
682
683
683
const uint8_t* block_data;
684
684
685
685
foreach_memory_block(context, block)
686
686
{
687
- block_data = block->fetch_data (block);
687
+ block_data = yr_fetch_block_data (block);
688
688
689
689
if (block_data != NULL)
690
690
{
0 commit comments