<commit_before>#include <cmath>

// Any class annotated with this macro will be exposed and have all functions exposed.
// Any class deriving from an exposed class will have its constructors exposed.
#define C_API __attribute__((annotate("GENERATE_C_API")))

struct Shape
{
  virtual ~Shape() {}
  virtual double area() const = 0;
  virtual double perimeter() const = 0;
  virtual const char* name() const = 0;
} C_API;

static const double pi = 3.14159265359;

class Circle : public Shape
{
  const double radius_;

public:
  double area() const override { return pi * radius_ * radius_; }

  double perimeter() const override { return 2 * pi * radius_; }
  
  const char* name() const override { return "Circle"; }

  Circle(double r) : radius_(r) {}
};

class Square : public Shape
{
  const double side_;

public:
  double area() const override { return side_ * side_; }

  double perimeter() const override { return 4.0 * side_; }
  
  const char* name() const override { return "Square"; }

  Square(double s) : side_(s) {}
};

class Pentagon : public Shape
{
  const double side_;

public:
  double area() const override { return 0.25 * sqrt(5.*(5.+2.*sqrt(5.))) * side_ * side_; }

  double perimeter() const override { return 5.0 * side_; }
  
  const char* name() const override { return "Pentagon"; }
  
  Pentagon(double s) : side_(s) {}
};<commit_msg>name constructor args as objc uses names<commit_after>#include <cmath>

// Any class annotated with this macro will be exposed and have all functions exposed.
// Any class deriving from an exposed class will have its constructors exposed.
#define C_API __attribute__((annotate("GENERATE_C_API")))

struct Shape
{
  virtual ~Shape() {}
  virtual double area() const = 0;
  virtual double perimeter() const = 0;
  virtual const char* name() const = 0;
} C_API;

static const double pi = 3.14159265359;

class Circle : public Shape
{
  const double radius_;

public:
  double area() const override { return pi * radius_ * radius_; }

  double perimeter() const override { return 2 * pi * radius_; }
  
  const char* name() const override { return "Circle"; }

  Circle(double radius) : radius_(radius) {}
};

class Square : public Shape
{
  const double side_;

public:
  double area() const override { return side_ * side_; }

  double perimeter() const override { return 4.0 * side_; }
  
  const char* name() const override { return "Square"; }

  Square(double side) : side_(side) {}
};

class Pentagon : public Shape
{
  const double side_;

public:
  double area() const override { return 0.25 * sqrt(5.*(5.+2.*sqrt(5.))) * side_ * side_; }

  double perimeter() const override { return 5.0 * side_; }
  
  const char* name() const override { return "Pentagon"; }
  
  Pentagon(double side) : side_(side) {}
};
{'fraction_non_alphanumeric': 0.11811307166006482, 'fraction_numerical': 0.019445444724522868, 'mean_word_length': 3.7979274611398965, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 5, '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': '1944419', 'n_tokens_mistral': 894, 'n_tokens_neox': 829, 'n_words': 320}