pyfmodex icon indicating copy to clipboard operation
pyfmodex copied to clipboard

structures and structure_declarations

Open bbbart opened this issue 3 years ago • 3 comments

Technical question: why are some structures defined completely in structures.py and others partially in structure_declarations.py?

Just asking as it makes importing them more of a hassle, since one needs to remember where the required structure comes from.

bbbart avatar May 04 '21 09:05 bbbart

You should not need to import anything from structure_declarations directly. I separated it just because i for reason wanted the partial declarations in a separate file, there's nothing more to that.

tyrylu avatar May 04 '21 15:05 tyrylu

In some samples, I needed CREATESOUNDEXINFO. I believed the only way to create such a structure was to import it from structure_declarations, but it seems I was wrong, indeed. The line from structure_declarations import * makes that unnecessary when writing code, but the Sphinx autodoc module is still confused and seperates the documentation of the different structures over the two.

Follow up question: why not separate all structures over those two files, for consistency's sake?

bbbart avatar May 04 '21 18:05 bbbart

I'll likely revisit the split before the next release, as i looked, i do not remember the exact reasons for putting some structs there.

tyrylu avatar May 04 '21 20:05 tyrylu