pygame-ce icon indicating copy to clipboard operation
pygame-ce copied to clipboard

Use PyObject_CallOneArg where applicable

Open ankith26 opened this issue 1 year ago • 2 comments
trafficstars

A PR that follows what #3020 did

ankith26 avatar Jul 28 '24 17:07 ankith26

This was actually part of my commit for 3020 before I pushed it up to GitHub. The reason I didn’t want to use this is because it’s not in the limited API, and I would still like to move towards compiling with the limited API.

We could have a shim that converts this to the old thing in that theoretical case, but I just felt like this was a less clear win than NoArgs, also because NoArgs docs claim speed and OneArgs docs don’t mention it.

Starbuck5 avatar Jul 28 '24 17:07 Starbuck5

I think this probably has the same level of "minor performance gain" as the other PR, but I didn't notice the limited API detail while making the PR

ankith26 avatar Jul 30 '24 10:07 ankith26