<commit_before>/*
  +----------------------------------------------------------------------+
  | Copyright (c) 2014 weheartwebsites UG                                |
  +----------------------------------------------------------------------+
  | This source file is subject to version 2 of the Apache license,      |
  | that is bundled with this package in the file LICENSE, and is        |
  | available through the world-wide-web at the following url:           |
  | http://www.apache.org/licenses/LICENSE-2.0.html                      |
  +----------------------------------------------------------------------+
  | Authors: <NAME> <<EMAIL>>                    |
  |          <NAME> <<EMAIL>>              |
  +----------------------------------------------------------------------+
*/

#ifdef HAVE_CONFIG_H
#include "config.h"
#endif

#include <stdlib.h>
#include <pthread.h>
#include <php.h>

#include "rdns.h"
#include "rdns_ev.h"

#define PHP_RDNS_VERSION "0.1.0"
#define PHP_RDNS_EXTNAME "RDNS"

#define RDNS_INIT_VARS                          \
  zval *object = getThis();                     \
  php_rdns_t *i_obj = NULL;

#define RDNS_FETCH_OBJECT                                                  \
  i_obj = (php_rdns_t *) zend_object_store_get_object( object TSRMLS_CC );

typedef struct {
  zend_object obj;
  zval *result;
  struct ev_loop *loop;
  struct rdns_resolver *resolver;
  pthread_mutex_t mutex;
  size_t nreq;
} php_rdns_t;<commit_msg>Get rid of warnings with PHP 5.4.<commit_after>/*
  +----------------------------------------------------------------------+
  | Copyright (c) 2014 weheartwebsites UG                                |
  +----------------------------------------------------------------------+
  | This source file is subject to version 2 of the Apache license,      |
  | that is bundled with this package in the file LICENSE, and is        |
  | available through the world-wide-web at the following url:           |
  | http://www.apache.org/licenses/LICENSE-2.0.html                      |
  +----------------------------------------------------------------------+
  | Authors: <NAME> <<EMAIL>>                    |
  |          <NAME> <<EMAIL>>              |
  +----------------------------------------------------------------------+
*/

#ifdef HAVE_CONFIG_H
#include "config.h"
#endif

#include <stdlib.h>
#include <pthread.h>

#include <php.h>
#include <ext/standard/info.h>

#include "rdns.h"
#include "rdns_ev.h"

#define PHP_RDNS_VERSION "0.1.0"
#define PHP_RDNS_EXTNAME "RDNS"

#define RDNS_INIT_VARS                          \
  zval *object = getThis();                     \
  php_rdns_t *i_obj = NULL;

#define RDNS_FETCH_OBJECT                                                  \
  i_obj = (php_rdns_t *) zend_object_store_get_object( object TSRMLS_CC );

typedef struct {
  zend_object obj;
  zval *result;
  struct ev_loop *loop;
  struct rdns_resolver *resolver;
  pthread_mutex_t mutex;
  size_t nreq;
} php_rdns_t;
{'fraction_non_alphanumeric': 0.274496644295302, 'fraction_numerical': 0.00738255033557047, 'mean_word_length': 1.1523465703971119, 'pattern_counts': {'":': 0, '<': 22, '<?xml version=': 0, '>': 22, 'https://': 0, 'lorem ipsum': 0, 'www.': 2, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 6, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '5634957', 'n_tokens_mistral': 871, 'n_tokens_neox': 820, 'n_words': 201}