* Fixed issue #1029
The problem happened because in the described case the
tl::Variant used as a intermediate container holds the
Python QBrush object and when it gets deleted, the
QBrush object is deleted too.
* Added tests
* 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.
* Smoothing function: provide ability to keep horizontal/vertical lines (important for cut lines)
* Introducting API compatibility macros for generic plugins.
1.) The ExpressionContext class is a mapping of tl::Eval
and allows providing a variable context for the LQ.
Expression class is derived from ExpressionContext now.
2.) The variable lookup has been changed so that variables
can be modified even if they come from a parent context.
3.) LayoutQuery and iterator has been given an argument to
supply the context
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.
* Spice writer can now be configure to skip the debug
comments
* < and > are allowed chars in spice names now
* global net names have second prio over labels now
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)
The comments for LoadLayoutOptions#layer_map, #cif_layer_map
and #dxf_layer_map have been updated to reflect the new status
of these properties (which have been methods). The tests
are updated accordingly (layer_map() -> layer_map).
Rationale:
pya.CplxTrans.angle is computed by doing atan2(m_sin, m_cos), but the algorithm used both in C and python for sin, cos and atan2 are not as precise as IEEE's float.
In python, for example, this happens:
``` python
>>> from math import pi, cos, sin, atan2
>>> atan2(sin(45*pi/180), cos(45*pi/180)) * 180 / pi == 45
False
>>> atan2(sin(45*pi/180), cos(45*pi/180)) * 180 / pi, 45
(44.99999999999999, 45)
```
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.