<commit_before>/* vi: set et sw=4 ts=8 cino=t0,(0: */
/* -*- Mode: C; indent-tabs-mode: nil; c-basic-offset: 4; tab-width: 8 -*- */
/*
 * This file is part of mission-control
 *
 * Copyright (C) 2007 Nokia Corporation. 
 *
 * Contact: <NAME>  <<EMAIL>>
 *
 * This library is free software; you can redistribute it and/or
 * modify it under the terms of the GNU Lesser General Public License
 * version 2.1 as published by the Free Software Foundation.
 *
 * This library is distributed in the hope that it will be useful, but
 * WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
 * Lesser General Public License for more details.
 *
 * You should have received a copy of the GNU Lesser General Public
 * License along with this library; if not, write to the Free Software
 * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
 * 02110-1301 USA
 *
 */

#ifndef __MCD_DEBUG_H__
#define __MCD_DEBUG_H__

#include <glib.h>
#include <glib-object.h>

G_BEGIN_DECLS

#undef DEBUG

#ifdef ENABLE_DEBUG

#define DEBUG(format, ...) do {             \
    if (mcd_debug_get_level () > 0)         \
        g_debug (format, ##__VA_ARGS__);    \
} while (0)

#else /* !defined ENABLE_DEBUG */

#define DEBUG(format, ...) do {} while (0)

#endif /* ENABLE_DEBUG */

#define g_object_ref(obj)    (mcd_debug_ref (obj, __FILE__, __LINE__))
#define g_object_unref(obj)  (mcd_debug_unref (obj, __FILE__, __LINE__))

void mcd_debug_init (void);

inline gint mcd_debug_get_level (void);

gpointer mcd_debug_ref (gpointer obj, const gchar *filename, gint linenum);
void mcd_debug_unref (gpointer obj, const gchar *filename, gint linenum);

void mcd_debug_print_tree (gpointer obj);

G_END_DECLS

#endif /* __MCD_DEBUG_H__ */<commit_msg>Debug object references only if --enable-debug is given<commit_after>/* vi: set et sw=4 ts=8 cino=t0,(0: */
/* -*- Mode: C; indent-tabs-mode: nil; c-basic-offset: 4; tab-width: 8 -*- */
/*
 * This file is part of mission-control
 *
 * Copyright (C) 2007 Nokia Corporation. 
 *
 * Contact: <NAME>  <<EMAIL>>
 *
 * This library is free software; you can redistribute it and/or
 * modify it under the terms of the GNU Lesser General Public License
 * version 2.1 as published by the Free Software Foundation.
 *
 * This library is distributed in the hope that it will be useful, but
 * WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
 * Lesser General Public License for more details.
 *
 * You should have received a copy of the GNU Lesser General Public
 * License along with this library; if not, write to the Free Software
 * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
 * 02110-1301 USA
 *
 */

#ifndef __MCD_DEBUG_H__
#define __MCD_DEBUG_H__

#include <glib.h>
#include <glib-object.h>

G_BEGIN_DECLS

#undef DEBUG

#ifdef ENABLE_DEBUG

#define DEBUG(format, ...) do {             \
    if (mcd_debug_get_level () > 0)         \
        g_debug (format, ##__VA_ARGS__);    \
} while (0)

/* reference count debugging */
#define g_object_ref(obj)    (mcd_debug_ref (obj, __FILE__, __LINE__))
#define g_object_unref(obj)  (mcd_debug_unref (obj, __FILE__, __LINE__))

#else /* !defined ENABLE_DEBUG */

#define DEBUG(format, ...) do {} while (0)

#endif /* ENABLE_DEBUG */

void mcd_debug_init (void);

inline gint mcd_debug_get_level (void);

gpointer mcd_debug_ref (gpointer obj, const gchar *filename, gint linenum);
void mcd_debug_unref (gpointer obj, const gchar *filename, gint linenum);

void mcd_debug_print_tree (gpointer obj);

G_END_DECLS

#endif /* __MCD_DEBUG_H__ */
{'fraction_non_alphanumeric': 0.10653950953678475, 'fraction_numerical': 0.014168937329700272, 'mean_word_length': 3.7924281984334205, 'pattern_counts': {'":': 0, '<': 13, '<?xml version=': 0, '>': 15, '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': '2526214', 'n_tokens_mistral': 1240, 'n_tokens_neox': 1196, 'n_words': 434}