Files
cpp-thirdparty/winx64/bin/swig-3.0.12/Examples/ruby/operator/example.i
Bassem Girgis 81b4b9e273 Initial commit
2018-12-20 17:34:07 -06:00

27 lines
544 B
OpenEdge ABL

/* File : example.i */
%module example
%warnfilter(SWIGWARN_IGNORE_OPERATOR_EQ);
%{
#include "example.h"
%}
/* This header file is a little tough to handle because it has overloaded
operators and constructors. We're going to try and deal with that here */
/* Grab the original header file */
%include "example.h"
/* An output method that turns a complex into a short string */
%extend Complex {
char *__str__() {
static char temp[512];
sprintf(temp,"(%g,%g)", $self->re(), $self->im());
return temp;
}
};