Message393466
For the same reason that motivated this ticket, I think the functions should be inline functions. They should also take the current thread-state as argument, because that's probably known on the caller side already.
I guess a macro would be fine, too. :)
Cython previously used "use_tracing" directly because it needs to implement the exact same tracing/profiling behaviour as CPython, regardless of who called a Cython implemented function (Cython or CPython).
Naming nit: Get/Is/UsesTracing?
Also, given that a common use case seems to be "make sure tracing is disabled, do something, enable tracing if it was enabled", I think DisableTracing() should return the previous state. |
|
Date |
User |
Action |
Args |
2021-05-11 18:16:10 | scoder | set | recipients:
+ scoder, rhettinger, vstinner, petr.viktorin, Mark.Shannon, hroncok |
2021-05-11 18:16:10 | scoder | set | messageid: <1620756970.56.0.177047034601.issue43760@roundup.psfhosted.org> |
2021-05-11 18:16:10 | scoder | link | issue43760 messages |
2021-05-11 18:16:10 | scoder | create | |
|