// Copyright © 2017 ChaiShushan . // License: https://creativecommons.org/licenses/by-nc-sa/4.0/ extern "C" { #include "./person_capi.h" } struct Person { static Person* New(const char* name, int age) { return (Person*)person_new((char*)name, age); } void Delete() { person_delete(person_handle_t(this)); } void Set(char* name, int age) { person_set(person_handle_t(this), name, age); } char* GetName(char* buf, int size) { return person_get_name(person_handle_t(this), buf, size); } int GetAge() { return person_get_age(person_handle_t(this)); } };