<commit_before>/* $Id: curl.c,v 1.103 2002/07/02 13:48:13 kjetilja Exp $ */

/* PycURL -- cURL Python module
 *
 * Authors:
 *  <NAME> <kjetilja at cs.uit.no>
 *  <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>
 *
 * See file COPYING for license information.
 *
 */

/* 
    TODO for the multi interface:
    - fix the deallocation race, just apply the same stuff as for deallocation
      of curl objects (handles and state attributes)
    - add interface to the multi_read method, otherwise it's hard to use this
      for anything
    - also try to figure out how to solve the problem of having deallocated
      curl objects in an active curl-multi stack (this causes a segfault when
      the multi-stack is cleaned up) 
*/ 

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


/* Ensure we have an updated libcurl */
#if !defined(LIBCURL_VERSION_NUM) || (LIBCURL_VERSION_NUM < 0x070908)
#  error "Need libcurl version 7.9.8 or greater to compile pycurl."
#endif

static PyObject *ErrorObject;

typedef struct {
    PyObject_HEAD
    CURL *handle;<commit_msg>added the fd_set issues to the todo list as well<commit_after>/* $Id: curl.c,v 1.104 2002/07/02 13:49:16 kjetilja Exp $ */

/* PycURL -- cURL Python module
 *
 * Authors:
 *  <NAME> <kjetilja at cs.uit.no>
 *  <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>
 *
 * See file COPYING for license information.
 *
 */

/* 
    TODO for the multi interface:
    - fix the deallocation race, just apply the same stuff as for deallocation
      of curl objects (handles and state attributes)
    - add interface to the multi_read method, otherwise it's hard to use this
      for anything
    - also try to figure out how to solve the problem of having deallocated
      curl objects in an active curl-multi stack (this causes a segfault when
      the multi-stack is cleaned up) 
    - how do we best interface with the fd_set stuff?
*/ 

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


/* Ensure we have an updated libcurl */
#if !defined(LIBCURL_VERSION_NUM) || (LIBCURL_VERSION_NUM < 0x070908)
#  error "Need libcurl version 7.9.8 or greater to compile pycurl."
#endif

static PyObject *ErrorObject;

typedef struct {
    PyObject_HEAD
    CURL *handle;
{'fraction_non_alphanumeric': 0.11250423585225347, 'fraction_numerical': 0.02507624534056252, 'mean_word_length': 3.439097744360902, 'pattern_counts': {'":': 0, '<': 45, '<?xml version=': 0, '>': 43, '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': '1239402', 'n_tokens_mistral': 1093, 'n_tokens_neox': 1014, 'n_words': 351}