Skip to content

Commit

Permalink
doc: grammar tweaks
Browse files Browse the repository at this point in the history
  • Loading branch information
Zen-CODE committed Apr 16, 2016
1 parent 5537423 commit c2f0100
Showing 1 changed file with 8 additions and 6 deletions.
14 changes: 8 additions & 6 deletions docs/source/core_tutorials.rst
Original file line number Diff line number Diff line change
Expand Up @@ -556,12 +556,14 @@ and the third the name ``CGRect``. ``CGRect`` is used because it can help the
user as an indicator of actual type if it is missing. The last one is another
unknown type, so pyobjus will generate the name 'c'.

Notice that in case of ``CGRect``, memeber will have ``origin`` and ``size`` members, because it is already defined,
and we know info about its members. But for last member, pyobjus will continue recursive generating names
for its members.

Maybe you are asking yourself now, how will you know actual generated name, so pyobjus will help you with this.
There is ``getMembers`` function, which returns name and type of some field in struct::
Notice that in the case of the ``CGRect``, it will have ``origin`` and ``size``
members because it is already defined so we know about these. This is not true
for the last member, and pyobjus will thus choose the next alphabetical name
for this member.

Perhaps you are asking yourself how you would know what the actual generated
name is? Pyobjus will help you with this. There is a ``getMembers`` function
which returns the name and types of some of the fields in the struct::

print ret_type.getMembers()

Expand Down

0 comments on commit c2f0100

Please sign in to comment.