From: William S F. <ws...@fu...> - 2009-06-25 17:59:53
|
Solomon Gibbs wrote: > I have a rather nasty struct in the code I'm wrapping. Though version > 1.3.36, swig has always consumed it without complaining. However, I > recently downloaded 1.3.39 and now I get a syntax error at the line > corresponding to the end of the "meta_size" struct (below). The > preprocess result from running swig with -E looks like more or less what > I would expect. > > Does anyone have any idea what has changed, or how to figure out I am > doing wrong? I've tried a couple of the --debug-* options, but the parse > seems to stop before they can have any effect. > > Any help would be appreciated. > > The following struct doesn't seem to work under 1.3.38 or 1.3.39. I > haven't checked 1.3.37. > > typedef struct H5O_info_t { > unsigned long fileno; > haddr_t addr; > H5O_type_t type; > unsigned rc; > time_t atime; > time_t mtime; > time_t ctime; > time_t btime; > hsize_t num_attrs; > struct { > unsigned version; > unsigned nmesgs; > unsigned nchunks; > unsigned flags; > struct { > hsize_t total; > hsize_t meta; > hsize_t mesg; > hsize_t free; > } space; > struct { > uint64_t present; > uint64_t shared; > } mesg; > } hdr; > struct { > H5_ih_info_t obj; > H5_ih_info_t attr; > } meta_size; > } H5O_info_t; > I don't get any error using this struct and I don't see any problems using valgrind on SWIG for this struct. I think the best thing is for you to provide the exact commandline options you are passing to SWIG and provide a complete standalone interface file that shows the problem. Also which operating system, compiler and compile options you used to compile SWIG. William |