Skip to content

Commit 79954d3

Browse files
GLMONTERTad Keller
and
Tad Keller
authored
use new module macros in docs (VirusTotal#2100)
Co-authored-by: Tad Keller <[email protected]>
1 parent 6936a2a commit 79954d3

File tree

1 file changed

+7
-7
lines changed

1 file changed

+7
-7
lines changed

docs/writingmodules.rst

+7-7
Original file line numberDiff line numberDiff line change
@@ -974,26 +974,26 @@ to the module's variables, or additional data stored in the ``data`` field of
974974
``YR_OBJECT`` structures as discussed earlier in
975975
:ref:`storing-data-for-later-use`. But for that we need a way to get access to
976976
the corresponding ``YR_OBJECT`` first. There are two functions to do that:
977-
``module()`` and ``parent()``. The ``module()`` function returns a pointer to
977+
``yr_module()`` and ``yr_parent()``. The ``yr_module()`` function returns a pointer to
978978
the top-level ``YR_OBJECT`` corresponding to the module, the same one passed
979-
to the ``module_load`` function. The ``parent()`` function returns a pointer to
979+
to the ``module_load`` function. The ``yr_parent()`` function returns a pointer to
980980
the ``YR_OBJECT`` corresponding to the structure where the function is
981981
contained. For example, consider the following code snippet:
982982

983983
.. code-block:: c
984984
985985
define_function(f1)
986986
{
987-
YR_OBJECT* module = module();
988-
YR_OBJECT* parent = parent();
987+
YR_OBJECT* module = yr_module();
988+
YR_OBJECT* parent = yr_parent();
989989
990990
// parent == module;
991991
}
992992
993993
define_function(f2)
994994
{
995-
YR_OBJECT* module = module();
996-
YR_OBJECT* parent = parent();
995+
YR_OBJECT* module = yr_module();
996+
YR_OBJECT* parent = yr_parent();
997997
998998
// parent != module;
999999
}
@@ -1026,4 +1026,4 @@ you get a pointer to the ``YR_SCAN_CONTEXT`` structure:
10261026

10271027
.. code-block:: c
10281028
1029-
YR_SCAN_CONTEXT* context = scan_context();
1029+
YR_SCAN_CONTEXT* context = yr_scan_context();

0 commit comments

Comments
 (0)