From: Johann N. <yn...@we...> - 2012-05-08 08:39:26
|
sorry, my first posting contained html. I did not realize that my web email client always sends html. I switched the client now. swig 2.01 ruby 1.93 SLES 11 original post : I want to wrap a library Function writen in C to ruby which contains an array of structs. I adopted %array_class(double, doubleArray); from http://www.swig.org/Doc2.0/Library.html#Library_carrays interface file: %array_class(Param , ParamArray); typedef struct Param Param extern int ep_authorization(Param pa[]); ruby: pa = Epayment::ParamArray.new(10) p = Epayment::Param.new p.name = "module" p.value = "x" pa[0] = p Epayment.ep_authorization(pa) I get this error message: Expected argument 1 of type Param [], but got Epayment::ParamArray Perhaps there is an obvious solution for this, but I am new to swig and couldn't find a solution for this either in the doku nor in the archives. Thanks for any hints |