<commit_before>

cdef extern from "pythread.h":

    ctypedef void *PyThread_type_lock
    ctypedef void *PyThread_type_sema

    void PyThread_init_thread()
    long PyThread_start_new_thread(void (*)(void *), void *)
    void PyThread_exit_thread()
    long PyThread_get_thread_ident()

    PyThread_type_lock PyThread_allocate_lock()
    void PyThread_free_lock(PyThread_type_lock)
    int PyThread_acquire_lock(PyThread_type_lock, int mode) nogil
    void PyThread_release_lock(PyThread_type_lock) nogil

    enum:
        # 'mode' in PyThread_acquire_lock()
        WAIT_LOCK    #   1
        NOWAIT_LOCK  #   0

    ctypedef enum PyLockStatus:
        # return values of PyThread_acquire_lock() in CPython 3.2+
        PY_LOCK_FAILURE = 0
        PY_LOCK_ACQUIRED = 1
        PY_LOCK_INTR

    size_t PyThread_get_stacksize()
    int PyThread_set_stacksize(size_t)<commit_msg>Add FIXMEs to C-API functions that changed in Py3.7 but are not free of risk to adapt to because the error case returns ((unsigned long)-1) now instead of ((long)-1).<commit_after>

cdef extern from "pythread.h":

    ctypedef void *PyThread_type_lock
    ctypedef void *PyThread_type_sema

    void PyThread_init_thread()
    long PyThread_start_new_thread(void (*)(void *), void *)  # FIXME: legacy
    #unsigned long PyThread_start_new_thread(void (*)(void *), void *)  # returned 'long' before Py3.7
    void PyThread_exit_thread()
    long PyThread_get_thread_ident()  # FIXME: legacy
    #unsigned long PyThread_get_thread_ident()  # returned 'long' before Py3.7

    PyThread_type_lock PyThread_allocate_lock()
    void PyThread_free_lock(PyThread_type_lock)
    int PyThread_acquire_lock(PyThread_type_lock, int mode) nogil
    void PyThread_release_lock(PyThread_type_lock) nogil

    enum:
        # 'mode' in PyThread_acquire_lock()
        WAIT_LOCK    #   1
        NOWAIT_LOCK  #   0

    ctypedef enum PyLockStatus:
        # return values of PyThread_acquire_lock() in CPython 3.2+
        PY_LOCK_FAILURE = 0
        PY_LOCK_ACQUIRED = 1
        PY_LOCK_INTR

    size_t PyThread_get_stacksize()
    int PyThread_set_stacksize(size_t)
{'fraction_non_alphanumeric': 0.06891701828410689, 'fraction_numerical': 0.009376465072667605, 'mean_word_length': 3.5793991416309012, 'pattern_counts': {'":': 2, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '7041131', 'n_tokens_mistral': 745, 'n_tokens_neox': 712, 'n_words': 167}