<commit_before>/*
 * Copyright (C) 2007 <NAME>
 * You may redistribute this under the terms of the Ruby license.
 * See LICENSE for details
 */

#ifndef REV_H
#define REV_H

#include "ruby.h"
#include "rubyio.h"

#if HAVE_RB_IO_T
#define FPTR_TO_FD(fptr) fptr->fd
#else
#define FPTR_TO_FD(fptr) fileno(fptr->f)
#endif

struct Rev_Event
{
  /* These values are used to extract events from libev callbacks */
  VALUE watcher;
  int revents;
};<commit_msg>Attempt to fix Ruby 1.8.7 incompatibilties<commit_after>/*
 * Copyright (C) 2007 <NAME>
 * You may redistribute this under the terms of the Ruby license.
 * See LICENSE for details
 */

#ifndef REV_H
#define REV_H

#include "ruby.h"
#include "rubyio.h"

#if !HAVE_RB_IO_T  || (RUBY_VERSION_MAJOR == 1 && RUBY_VERSION_MINOR == 8)
#define FPTR_TO_FD(fptr) fileno(fptr->f)
#else
#define FPTR_TO_FD(fptr) fptr->fd
#endif

struct Rev_Event
{
  /* These values are used to extract events from libev callbacks */
  VALUE watcher;
  int revents;
};
{'fraction_non_alphanumeric': 0.11178247734138973, 'fraction_numerical': 0.013091641490433032, 'mean_word_length': 4.372972972972973, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 9, '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': '599059', 'n_tokens_mistral': 394, 'n_tokens_neox': 372, 'n_words': 117}