You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I got some feedback from confused users of my SWIG-wrapped library that saved (with "save") and loaded back (with "load") their workspace containing SWIG Classes.
Clearly the "save" and "load" are not supported out-of-the-box by the SWIG Classes. The main source of confusion is that the class are saved and loaded without any warning, and then they fail with an error message when the user interacts with the loaded classes.
To have a clearer error message, I tried to implement a saveobj method in SwigRef that just print a warning as soon as the user try to save a SWIG class, but I don't know if it could make sense to have this in the SwigRef.m generated by SWIG.
The text was updated successfully, but these errors were encountered:
warning: Serializing SWIG objects not supported.
warning: called from
saveobj at line 16 column 7
error: saveobj: not defined for class "char"
error: called from
saveobj at line 51 column 3
saveobj at line 17 column 11
which isn't great either. I think better to call error directly
I got some feedback from confused users of my SWIG-wrapped library that saved (with "save") and loaded back (with "load") their workspace containing SWIG Classes.
Clearly the "save" and "load" are not supported out-of-the-box by the SWIG Classes. The main source of confusion is that the class are saved and loaded without any warning, and then they fail with an error message when the user interacts with the loaded classes.
To have a clearer error message, I tried to implement a saveobj method in
SwigRef
that just print a warning as soon as the user try to save a SWIG class, but I don't know if it could make sense to have this in the SwigRef.m generated by SWIG.The text was updated successfully, but these errors were encountered: