<commit_before>/* $Id: rmagick.h,v 1.201 2007/09/23 20:42:00 rmagick Exp $ */
/*=============================================================================
|               Copyright (C) 2006 by <NAME>
| Name:     rmagick.h
| Purpose:  RMagick declarations and definitions
| Author:   <NAME>
\============================================================================*/

#ifndef _RMAGICK_H_
#define _RMAGICK_H_

#include <assert.h>
#include <stdio.h>
#include <ctype.h>
#include <stdint.h>
#include <stdlib.h>
#include <math.h>
#include <time.h>
#if defined(HAVE_SYS_TYPES_H)
#include <sys/types.h>
#endif
#include "ruby.h"
#include "intern.h"
#include "rubyio.h"


// Undef Ruby's versions of these symbols
#undef PACKAGE_VERSION
#undef PACKAGE_NAME
#undef PACKAGE_STRING
#undef PACKAGE_BUGREPORT
#undef PACKAGE_TARNAME

#include "magick/MagickCore.h"

// Undef ImageMagick's versions of these symbols
#undef PACKAGE_STRING


#include "extconf.h"

// Backport these definitions to Ruby 1.6.7
#if !defined(ULONG2NUM)
#define ULONG2NUM(v) UINT2NUM(v)
#endif

#if !defined(LONG2NUM)
#define LONG2NUM(v) INT2NUM(v)
#endif

// For quoting preprocessor symbols
#define Q2(q) #q
#define Q(q) Q2(q)


// Trace new image creation in bang methods
#define UPDATE_DATA_PTR(_obj_, _new_) \
    do { (void) rm_trace_creation(_new_);\
    DATA_PTR(_obj_) = (void *)(_new_);\
    } while(0)


// Handle Quantum <-> Ruby Numeric object conversion
#if (QuantumDepth == 8 || QuantumDepth == 16)
#define QUANTUM2NUM(q) INT2FIX((q))
#define NUM2QUANTUM(n) (Quantum)NUM2UINT((n))
#elif (QuantumDepth == 32)
#define QUANTUM2NUM(q) UINT2NUM((q))
#define NUM2QUANTUM(n) (Quantum)NUM2UINT((n))
#elif (QuantumDepth == 64)
#define QUANTUM2NUM(q) ULL2NUM((q))
#define NUM2QUANTUM(n) (Quantum)NUM2ULL((n))
#else
#error Specified QuantumDepth is not supported.
#endif<commit_msg>Remove unecessary definitions of ULONG2NUM and LONG2NUM. These are available in all supported releases of Ruby.<commit_after>/* $Id: rmagick.h,v 1.202 2007/09/23 20:46:27 rmagick Exp $ */
/*=============================================================================
|               Copyright (C) 2006 by <NAME>
| Name:     rmagick.h
| Purpose:  RMagick declarations and definitions
| Author:   <NAME>
\============================================================================*/

#ifndef _RMAGICK_H_
#define _RMAGICK_H_

#include <assert.h>
#include <stdio.h>
#include <ctype.h>
#include <stdint.h>
#include <stdlib.h>
#include <math.h>
#include <time.h>
#if defined(HAVE_SYS_TYPES_H)
#include <sys/types.h>
#endif
#include "ruby.h"
#include "intern.h"
#include "rubyio.h"


// Undef Ruby's versions of these symbols
#undef PACKAGE_VERSION
#undef PACKAGE_NAME
#undef PACKAGE_STRING
#undef PACKAGE_BUGREPORT
#undef PACKAGE_TARNAME

#include "magick/MagickCore.h"

// Undef ImageMagick's versions of these symbols
#undef PACKAGE_STRING


#include "extconf.h"


// For quoting preprocessor symbols
#define Q2(q) #q
#define Q(q) Q2(q)


// Trace new image creation in bang methods
#define UPDATE_DATA_PTR(_obj_, _new_) \
    do { (void) rm_trace_creation(_new_);\
    DATA_PTR(_obj_) = (void *)(_new_);\
    } while(0)


// Handle Quantum <-> Ruby Numeric object conversion
#if (QuantumDepth == 8 || QuantumDepth == 16)
#define QUANTUM2NUM(q) INT2FIX((q))
#define NUM2QUANTUM(n) (Quantum)NUM2UINT((n))
#elif (QuantumDepth == 32)
#define QUANTUM2NUM(q) UINT2NUM((q))
#define NUM2QUANTUM(n) (Quantum)NUM2UINT((n))
#elif (QuantumDepth == 64)
#define QUANTUM2NUM(q) ULL2NUM((q))
#define NUM2QUANTUM(n) (Quantum)NUM2ULL((n))
#else
#error Specified QuantumDepth is not supported.
#endif
{'fraction_non_alphanumeric': 0.21365638766519823, 'fraction_numerical': 0.027257709251101322, 'mean_word_length': 5.510752688172043, 'pattern_counts': {'":': 0, '<': 25, '<?xml version=': 0, '>': 25, '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': '2719039', 'n_tokens_mistral': 1405, 'n_tokens_neox': 1272, 'n_words': 330}