Last 12 weeks · 0 commits
4 of 6 standards met
PyTypeObject uses PyObject_VAR_HEAD. Initializing a PyObject_VAR_HEAD with PyObject_HEAD_INIT(NULL) happens to work on Python 3 if NULL is convertible to Py_ssize_t, but it's actually completely nonsensical. The details differ between Python 3.x versions, but basically it's initializing the object size (Py_ssize_t) to NULL, and relying on static variable zero initialization to initialize the type to NULL. Use PyVarObject_HEAD_INIT, as the API is intended to be [1]. [1]: https://docs.python.org/3.14/c-api/typeobj.html#examples
Repository: facebook/pyre2. Description: Python wrapper for RE2 Stars: 648, Forks: 179. Primary language: C++. Languages: C++ (73.8%), Python (25.7%), Makefile (0.5%). License: BSD-3-Clause. Open PRs: 3, open issues: 5. Last activity: 2y ago. Community health: 75%. Top contributors: sunshowers, dreiss, noxiouz, moreati, flarnie, jamesgpearce, adamhooper, SpamapS, jwilk, rla3rd and others.