From: Ian L. T. <ia...@go...> - 2010-05-25 20:07:57
|
William S Fulton <ws...@fu...> writes: >> > What is XXX in the "go" typemaps meant to indicate, it doesn't seem >> > very conventional. >> >> It's meant to indicate a case where the typemaps are unable to convert >> the type from C/C++ syntax to Go syntax. Those are the cases which >> the code in go.cxx has to handle. For example, the syntax for pointer >> to pointer to int in C/C++ is of course "int**" and in Go is "**int". >> The typemap code does not seem able to make that transformation. >> The function goTypeWithInfo handles the transformations which aren't >> handled in the typemap code. >> > I need to look at the generated code, but probably a special variable > will be more suitable as these indicate a substitution by SWIG of some > sort, whereas XXX is not very conventional. Is there any existing example I could look at? To be clear, the XXX never appears in the generated code. The code in go.cxx looks for XXX and replaces it with something else generated at runtime. Ian |