%module Creddy %include "exception.i" %include "language.i" %exception { try { $action } catch (const std::exception &e) { SWIG_exception(SWIG_RuntimeError, e.what()); } } // Accessing these overloaded functions confuses perl and python. // We ignore the string version and rename the char * version to // member_name. The bare name takes an open file. %ignore Creddy::ID::write_cert(const std::string&); %rename(write_cert_name) Creddy::ID::write_cert(const char *); %ignore Creddy::ID::write_privkey(const std::string&); %rename(write_privkey_name) Creddy::ID::write_privkey(const char *); %ignore Creddy::Attribute::write(const std::string&); %rename(write_name) Creddy::Attribute::write(const char *); %{ #include "creddy.hh" using namespace Creddy; %} %include "creddy.h" %include "creddy.hh"