From: Leif M. <lei...@gm...> - 2012-08-13 19:28:01
|
Hello everyone, Find a short summary of what I did during last week below. Tasks for the week were: My tasks for this week are: - Make the std::vector test work for the C backend - Write/implement more runtime tests [- Fix enums' (class/namespace) value context] What I actually did: - Fixed partialcheck for the C backend - Removed name mangling of functions since it broke template functions - Added test and runtime implementation for C backend for template functions - Added/cleaned up some typemaps - Fixed some runtime test implementations - Added a test for templates (will be removed again, once the available tests work) Problems: I've encountered major problems while trying to make std::vector work completely for the C backend. Actually, everything that returns const SOMETYPE** is affected. See the attached very small example. So every instance of std::vector<const SOMETYPE*> is broken too, because the std::vector<T>::at returns a const reference to the members. It turned out that the reason my test of std::vector<int> works is that the person who worked on C before me commented out almost all primitive declarations of std::vector except for those for int and bool. Even if this is repaired, somehow swig won't resolve the following type within vector for primitive types: void push_back(const value_type& x); This is bad, because it'll force C++ code (e.g. "std::vector< float >::value_type") into the proxy.c file which could lead to ambiguities of types (our SwigType typemap vs. the real C++ class). Tasks for this week are: - Clean up code - Write docs about (non) working features [- if feasible make std::vector work completely] As always, if you have any questions or comments, please feel free to ask. -- Leif |