* Fixed the issue - Byte array variant was not properly converted to Python/Ruby objects.
* Added tests + properly converting byte arrays to byte array variants in Python.
Problem: the debugger was printing an object's value as string.
The effect is that for big objects "to_s" will deliver huge strings
(e.g. polygons, netlists ...). "inspect" is better (already used
for Python), but it's aliased to "to_s" in Python and Ruby.
Huge strings will stall the debugger.
The solution is to stop this aliasing (Ruby 2.x doesn't do it
itself anymore) and use "inspect" consistently for Python and
Ruby.
Details can still be printed in the console.
Because long is 32bit on Windows (like int), the
conversion from long to unsigned int was subject
to sign overflow. This was fixed by going to
unsigned int via unsigned long.
In addition, this fix includes Python-related fixes: because
of the short lifetime of Python references, the functionality
was not as expected sometimes. Keeping copies of LayerPropertiesIterators
helped. Some tweaks were required to maintain the delete() semantics.
The main fix was to not register the original class when
adding it as a child class. Otherwise duplication happened.
This requires sorting of some kind when generating the classes.
Some refactoring has been applied here.
Reimplementing virtual functions with
"const &" arguments wasn't behaving as
expected because these arguments were
copied.
Now, "const &" for arguments (in virtual
function reimplementation) is not implemented
as a copy.
In addition, now it's possible to declare
results as references always (also if const &).
See gsiTest.cc:1078 for example:
// gsi::arg_make_reference makes the function's return value
// always being taken as a reference
gsi::method<C_P, const CopyDetector &, const CopyDetector &, gsi::arg_make_reference> ("pass_cd_cref_as_ref", &C_P::pass_cd_cref)
Needed to refactor the class hierarchy of the Python classes.
Basically the module specific base class was removed as it does
not provide any benefit. The object layout of the PyObject
specialization was modified such that the payload is attached
to the end. This is compatible with the hidden extensions
which Python adds to normal objects.