H-uru / Plasma

Cyan Worlds's Plasma game engine
http://h-uru.github.io/Plasma/
GNU General Public License v3.0
205 stars 81 forks source link

Miscellaneous simple pfPython cleanups #1328

Closed dgelessus closed 1 year ago

dgelessus commented 1 year ago

Edit: I'm realizing now that the Py_RETURN_NONE change will cause merge conflicts for all open PRs that touch the Python glue...

Hoikas commented 1 year ago

The only concern I have is with b26d35f -- while it is annoying to have duplicated macros, it's nice, IMO, to have a consistent design language around our python bindings, which we get from our macros. Meaning, everything is cased the same. I wonder if it would be better to redefine our macros to point to the standard ones? :thinking:

dgelessus commented 1 year ago

Yeah, it's nice to have PYTHON_RETURN_NONE for symmetry with PYTHON_RETURN_ERROR, instead of Py_RETURN_NONE. I undid the mass replace and did what you suggested (I had to redo that commit anyway because of conflicts).

Generally I would argue against keeping custom versions of standard/established APIs like this - but with all the other custom macros that the Python glue uses, these two don't make a big difference.