sumerc / yappi

Yet Another Python Profiler, but this time multithreading, asyncio and gevent aware.
MIT License
1.44k stars 72 forks source link

Fix function type signature and sentinel in method table #77

Closed stephan-cr closed 3 years ago

stephan-cr commented 3 years ago

This commit fixes two method table issues.

First, it fixes the type signature of the "stop" function, otherwise, as far as I know, undefined behavior is invoked (and may or may not cause weird things immediately).

Second, it fixes the sentinel of the method table, as described in [1] and [2].

[1] https://docs.python.org/2.7/extending/extending.html#the-module-s-method-table-and-initialization-function [2] https://docs.python.org/3/extending/extending.html#the-module-s-method-table-and-initialization-function

sumerc commented 3 years ago

Thanks!