Skip to content

Commit

Permalink
Fix 2 errors for the document: (#1968)
Browse files Browse the repository at this point in the history
1. Depending on the context the "bar" should be "foo" because foo is a structure while bar is just a string.
2. The module_object's name is wrong.
  • Loading branch information
smallbigcake authored Sep 22, 2023
1 parent 1a85738 commit d399826
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions docs/writingmodules.rst
Original file line number Diff line number Diff line change
Expand Up @@ -755,7 +755,7 @@ And the value for ``qux`` like this:
Do you remember that the ``module_object`` argument for ``module_load`` was a
pointer to a ``YR_OBJECT``? Do you remember that this ``YR_OBJECT`` is a
structure just like ``bar`` is? Well, you could also set the values for ``bar``
structure just like ``foo`` is? Well, you could also set the values for ``bar``
and ``qux`` like this:

.. code-block:: c
Expand Down Expand Up @@ -873,7 +873,7 @@ following example:
void* module_data,
size_t module_data_size)
{
module->data = yr_malloc(sizeof(MY_DATA));
module_object->data = yr_malloc(sizeof(MY_DATA));
((MY_DATA*) module_object->data)->some_integer = 0;
return ERROR_SUCCESS;
Expand Down

0 comments on commit d399826

Please sign in to comment.