-
Notifications
You must be signed in to change notification settings - Fork 1.3k
Open
Description
For a project which interfaces Go to C++ we noticed the following behaviour: when converting a custom type with an underlying type of const char* the generated conversion code is invalid.
How to reproduce
By creating the following files and running swig -go -c++ test.i one can observe that the both the Set and SetCustom correctly get a string as input. However the conversion of this string differs, where the conversion for the custom_string is invalid.
test.h
typedef const char *custom_string;
class Test
{
public:
void SetCustom(custom_string input) {
}
void Set(const char *input) {
}
};test.i
%module test
%{
#include "test.h"
%}
%include "test.h"