SWIG struct pointer as output parameter
问题 I have a struct: struct some_struct_s { int arg1; int arg2; }; I have a C function: int func(some_struct_s *output); Both are %included into my SWIG file. I want some_struct_s *output to be treated like an output parameter. Python example: int_val, some_struct_output = func() "Output parameters" is covered in the manual for POD-types (sec 10.1.3), but not for non-POD types. How do I tell SWIG I want some_struct_s *output to be an output parameter? 回答1: From the documentation: 11.5.7 "argout"