SWIG graciously provides the swig_type() function to get a string representation of the data type of a passed userdata object. However, in the case of member fields, SWIG and Lua consider those to be simple "number" items and so prints only "number" instead of the data type's name.
e.g.
typedef num_years int;
class Person
{
public:
Person * spouse;
num_years age;
};
in C++ would result in:
Lua 5.1.4 Copyright (C) 1994-2008 Lua.org, PUC-Rio
> p = MyModule.Person();
> print(swig_type(p.spouse));
Person *
> print(swig_type(p.age));
number
Is there some back-door route I could take to determine member fields' data types? I see that the get and set functions have the correct string representation of the number fields when validating arguments.
Thanks for any assistance!