<commit_before>/*
** test.c for  in /home/penava_b/perso/test
** 
** Made by penava_b
** Login   <<EMAIL>>
** 
** Started on  Wed Dec  9 06:10:58 2015 penava_b
** Last update Sun Jan 24 15:49:25 2016 penava_b
*/

#include "../inc/tools/for_each_va_args_macro.h"
#include <stdio.h>

#define _init(type, name, this, ...)			\
  ______VARARG(type ## _ ## name, this, ##__VA_ARGS__)

#define M(x, name, ...) _virtual.______VARARG(name, x, ##__VA_ARGS__)

#define new_method(type, name, ...)			\
  ______VARARG(type ## _ ## name, type *this, ##__VA_ARGS__)

#define method(name, ...)			\
  ______VARARGP(name, void *this, ##__VA_ARGS__)

void	int_ctor1(int *this)
{
}

void	new_method(int, printf)
{
  printf("%d\n", *this);
}

struct virtual
{
  void	method(printf);
}	_virtual = { (void *)int_printf1 };

int	main()
{
  int	i = 42;

  _init(int, ctor, &i);
  M(&i, printf);
}
<commit_msg>Add another example for the methodNameChange file<commit_after>/*
** test.c for  in /home/penava_b/perso/test
** 
** Made by penava_b
** Login   <<EMAIL>>
** 
** Started on  Wed Dec  9 06:10:58 2015 penava_b
** Last update Sun Jan 24 16:02:49 2016 penava_b
*/

#include "../inc/tools/for_each_va_args_macro.h"
#include <stdio.h>

#define _init(type, name, this, ...)			\
  ______VARARG(type ## _ ## name, this, ##__VA_ARGS__)

#define M(x, name, ...) _virtual.______VARARG(name, x, ##__VA_ARGS__)

#define new_method(type, name, ...)			\
  ______VARARG(type ## _ ## name, type *this, ##__VA_ARGS__)

#define method(name, ...)			\
  ______VARARGP(name, void *this, ##__VA_ARGS__)

/*----------------------------------------------------------------------*/

void	new_method(int, ctor)
{
}

void	new_method(int, ctor, int i)
{
  *this = i;
}

void	new_method(int, printf)
{
  printf("%d\n", *this);
}

struct virtual
{
  void	method(printf);
}	_virtual = { (void *)int_printf1 };

int	main()
{
  int	i = 42;

  _init(int, ctor, &i);
  _init(int, ctor, &i, 84);
  M(&i, printf);
}

{'fraction_non_alphanumeric': 0.21417644059153493, 'fraction_numerical': 0.02804691483936767, 'mean_word_length': 3.156779661016949, 'pattern_counts': {'":': 0, '<': 9, '<?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': '4005819', 'n_tokens_mistral': 864, 'n_tokens_neox': 795, 'n_words': 183}