* fix core dump when "new PyType" * add test code --------- Co-authored-by: 弄月 <{ID}+{username}@users.noreply.github.com>