<commit_before>/* $Id$ */

/* PycURL -- cURL Python module
 *
 * Authors:
 *  Copyright (C) 2001-2003 by <NAME> <kjetilja at cs.uit.no>
 *  Copyright (C) 2001-2003 by <NAME> <markus at oberhumer.com>
 *
 * Contributions:
 *  <NAME> <Tino.Lange at gmx.de>
 *  <NAME> <matt at gnik.com>
 *  <NAME> <conrad at hep.caltech.edu>
 *  <NAME> <amit_mongia at hotmail.com>
 *  <NAME> <esr at thyrsus.com>
 *
 * See file COPYING for license information.
 *
 * Some quick info on Python's refcount:
 *   Py_BuildValue          does incref the item(s)
 *   PyArg_ParseTuple       does NOT incref the item
 *   PyList_Append          does incref the item
 *   PyTuple_SET_ITEM       does NOT incref the item
 *   PyTuple_SetItem        does NOT incref the item
 *   PyXXX_GetItem          returns a borrowed reference
 */

#include <sys/types.h>
#include <stddef.h>
#include <stdlib.h>
#include <stdio.h>
#include <string.h>
#include <limits.h>
#if (defined(_WIN32) || defined(__WIN32__)) && !defined(WIN32)
#  define WIN32 1
#endif
#include <Python.h>
#include <curl/curl.h>
#include <curl/multi.h>
#undef NDEBUG
#include <assert.h>

/* Ensure we have updated versions */
#if !defined(PY_VERSION_HEX) || (PY_VERSION_HEX < 0x010502f0)
#  error "Need Python version 1.5.2 or greater to compile pycurl."
#endif
#if !defined(LIBCURL_VERSION_NUM) || (LIBCURL_VERSION_NUM < 0x070a03)
#  error "Need libcurl version 7.10.3 or greater to compile pycurl."
#endif

/* Beginning with Python 2.2 we support Cyclic Garbarge Collection */
#undef USE_GC
#if 1 && (PY_VERSION_HEX >= 0x02020000)
#  define USE_GC
#endif


#undef UNUSED
#define UNUSED(var)     ((void)&var)


/* Calculate the number of options we need to store */
#define OPTIONS_SIZE    105
static int PYCURL_OPT(int o)
{
    assert(o >= CURLOPTTYPE_OBJECTPOINT);
    assert(o < CURLOPTTYPE_OBJECTPOINT + OPTIONS_SIZE);
    return o - CURLOPTTYPE_OBJECTPOINT;
}


static PyObject *ErrorObject;<commit_msg>- requires 7.10.4 now<commit_after>/* $Id$ */

/* PycURL -- cURL Python module
 *
 * Authors:
 *  Copyright (C) 2001-2003 by <NAME> <kjetilja at cs.uit.no>
 *  Copyright (C) 2001-2003 by <NAME> <markus at oberhumer.com>
 *
 * Contributions:
 *  <NAME> <Tino.Lange at gmx.de>
 *  <NAME> <matt at gnik.com>
 *  <NAME> <conrad at hep.caltech.edu>
 *  <NAME> <amit_mongia at hotmail.com>
 *  <NAME> <esr at thyrsus.com>
 *
 * See file COPYING for license information.
 *
 * Some quick info on Python's refcount:
 *   Py_BuildValue          does incref the item(s)
 *   PyArg_ParseTuple       does NOT incref the item
 *   PyList_Append          does incref the item
 *   PyTuple_SET_ITEM       does NOT incref the item
 *   PyTuple_SetItem        does NOT incref the item
 *   PyXXX_GetItem          returns a borrowed reference
 */

#include <sys/types.h>
#include <stddef.h>
#include <stdlib.h>
#include <stdio.h>
#include <string.h>
#include <limits.h>
#if (defined(_WIN32) || defined(__WIN32__)) && !defined(WIN32)
#  define WIN32 1
#endif
#include <Python.h>
#include <curl/curl.h>
#include <curl/multi.h>
#undef NDEBUG
#include <assert.h>

/* Ensure we have updated versions */
#if !defined(PY_VERSION_HEX) || (PY_VERSION_HEX < 0x010502f0)
#  error "Need Python version 1.5.2 or greater to compile pycurl."
#endif
#if !defined(LIBCURL_VERSION_NUM) || (LIBCURL_VERSION_NUM < 0x070a04)
#  error "Need libcurl version 7.10.4 or greater to compile pycurl."
#endif

/* Beginning with Python 2.2 we support Cyclic Garbarge Collection */
#undef USE_GC
#if 1 && (PY_VERSION_HEX >= 0x02020000)
#  define USE_GC
#endif


#undef UNUSED
#define UNUSED(var)     ((void)&var)


/* Calculate the number of options we need to store */
#define OPTIONS_SIZE    105
static int PYCURL_OPT(int o)
{
    assert(o >= CURLOPTTYPE_OBJECTPOINT);
    assert(o < CURLOPTTYPE_OBJECTPOINT + OPTIONS_SIZE);
    return o - CURLOPTTYPE_OBJECTPOINT;
}


static PyObject *ErrorObject;
{'fraction_non_alphanumeric': 0.11890087313816128, 'fraction_numerical': 0.032357473035439135, 'mean_word_length': 3.620403321470937, 'pattern_counts': {'":': 0, '<': 57, '<?xml version=': 0, '>': 55, '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': '1614410', 'n_tokens_mistral': 1532, 'n_tokens_neox': 1395, 'n_words': 410}