I'm working on a SWIG wrapper for a function which (at the moment) has a float** as one of its arguments. In one of my rewrite attempts, I exploited the fact that gcc will let you specify the bounds of an array parameter as variables within the scope of a function declaration, as long as those variables are passed in first. Evidently this is a gcc-specific extension, though I'd be surprised if other compilers didn't do it too.
It compiles, but the generated wrapper doesn't (before, both the C and the wrapper compiled, but there was a runtime complaint in the interpreter about expecting a pointer type). Reading through the docs more closely, I see that I actually need to use a typemap, which should make things considerably less ugly, so now I'm working on wrapping my head around that.
no subject
no subject
It compiles, but the generated wrapper doesn't (before, both the C and the wrapper compiled, but there was a runtime complaint in the interpreter about expecting a pointer type). Reading through the docs more closely, I see that I actually need to use a typemap, which should make things considerably less ugly, so now I'm working on wrapping my head around that.