mirror of https://github.com/KLayout/klayout.git
Merge branch 'master' of https://github.com/KLayout/klayout into drc-enhancements
This commit is contained in:
commit
a81cc3cacf
|
|
@ -12,5 +12,17 @@ SOURCES = \
|
|||
INCLUDEPATH += $$RBA_INC $$PYA_INC $$LYM_INC $$TL_INC $$GSI_INC
|
||||
DEPENDPATH += $$RBA_INC $$PYA_INC $$LYM_INC $$TL_INC $$GSI_INC
|
||||
|
||||
LIBS += -L$$DESTDIR_UT -lklayout_rba -lklayout_pya -lklayout_lym -lklayout_tl -lklayout_gsi
|
||||
LIBS += -L$$DESTDIR_UT -lklayout_lym -lklayout_tl -lklayout_gsi
|
||||
|
||||
equals(HAVE_RUBY, "1") {
|
||||
LIBS += -lklayout_rba
|
||||
} else {
|
||||
LIBS += -lklayout_rbastub
|
||||
}
|
||||
|
||||
equals(HAVE_PYTHON, "1") {
|
||||
LIBS += -lklayout_pya
|
||||
} else {
|
||||
LIBS += -lklayout_pyastub
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -1010,16 +1010,29 @@ method_adaptor (int mid, int argc, VALUE *argv, VALUE self, bool ctor)
|
|||
|
||||
static ID id_to_enum = rb_intern ("to_enum");
|
||||
|
||||
VALUE method_sym = ID2SYM (rb_intern (meth->primary_name ().c_str ()));
|
||||
VALUE method_sym = ID2SYM (rb_intern2 (meth->primary_name ().c_str (), (long) meth->primary_name ().size ()));
|
||||
|
||||
if (argc == 0) {
|
||||
ret = rba_funcall2_checked (self, id_to_enum, 1, &method_sym);
|
||||
} else {
|
||||
#if 0
|
||||
// this solution does not work on MSVC2017 for unknown reasons and
|
||||
// makes the application segfault even without being called
|
||||
std::vector<VALUE> new_args;
|
||||
new_args.reserve (size_t (argc + 1));
|
||||
new_args.push_back (method_sym);
|
||||
new_args.insert (new_args.end (), argv, argv + argc);
|
||||
ret = rba_funcall2_checked (self, id_to_enum, argc + 1, new_args.begin ().operator-> ());
|
||||
#else
|
||||
VALUE new_args[16];
|
||||
tl_assert (argc + 1 <= sizeof(new_args) / sizeof(new_args[0]));
|
||||
VALUE *a = &new_args[0];
|
||||
*a++ = method_sym;
|
||||
for (int i = 0; i < argc; ++i) {
|
||||
*a++ = argv[i];
|
||||
}
|
||||
ret = rba_funcall2_checked (self, id_to_enum, argc + 1, &new_args[0]);
|
||||
#endif
|
||||
}
|
||||
|
||||
} else {
|
||||
|
|
|
|||
|
|
@ -679,9 +679,16 @@ class QtBinding_TestClass < TestBase
|
|||
|
||||
w = RBA::QObject::new
|
||||
|
||||
on = nil
|
||||
w.objectNameChanged do |name|
|
||||
on = name
|
||||
if w.respond_to?(:objectNameChanged) # Qt5
|
||||
|
||||
on = nil
|
||||
w.objectNameChanged do |name|
|
||||
on = name
|
||||
end
|
||||
|
||||
w.objectName = "uvw"
|
||||
assert_equal(on, "uvw")
|
||||
|
||||
end
|
||||
|
||||
od = false
|
||||
|
|
@ -689,12 +696,7 @@ class QtBinding_TestClass < TestBase
|
|||
od = true
|
||||
end
|
||||
|
||||
w.objectName = "uvw"
|
||||
|
||||
assert_equal(on, "uvw")
|
||||
|
||||
w._destroy
|
||||
|
||||
assert_equal(od, true)
|
||||
|
||||
end
|
||||
|
|
|
|||
Loading…
Reference in New Issue