use Inline C => 'DATA', structs => ['Person'];

my $obj = Inline::Struct::Person->new;
$obj->name("toto");
$obj->age(10);

print Person_print($obj), "\n";

__END__
__C__
  
struct Person {
	char *name;
    int age;
};
  
typedef struct Person Person;

SV *Person_print(Person *p) {
	return newSVpvf("name=%s, age=%d", p->name, p->age);
}
