diff options
author | Enrico Turri <enricoturri@seznam.cz> | 2018-05-31 17:04:59 +0300 |
---|---|---|
committer | Enrico Turri <enricoturri@seznam.cz> | 2018-05-31 17:04:59 +0300 |
commit | 6bf009edee89e6713c5c85af1e5dcf764c23bad5 (patch) | |
tree | 7ad7d42ca78a8e39df7debc719ad82948f6d5be3 /xs/src/libslic3r/utils.cpp | |
parent | 276533e236fed185744b9fc71331bd576c951b31 (diff) |
3DScene mouse event handler partially moved to c++ - part 2
Diffstat (limited to 'xs/src/libslic3r/utils.cpp')
-rw-r--r-- | xs/src/libslic3r/utils.cpp | 17 |
1 files changed, 11 insertions, 6 deletions
diff --git a/xs/src/libslic3r/utils.cpp b/xs/src/libslic3r/utils.cpp index c691073a4..883f5e753 100644 --- a/xs/src/libslic3r/utils.cpp +++ b/xs/src/libslic3r/utils.cpp @@ -238,9 +238,8 @@ void PerlCallback::call(int i, int j) const LEAVE; } -/* //############################################################################################################## -void PerlCallback::call(const std::vector<int> &ints) const +void PerlCallback::call(const std::vector<int>& ints) const //void PerlCallback::call(const std::vector<int> &ints) //############################################################################################################## { @@ -250,16 +249,22 @@ void PerlCallback::call(const std::vector<int> &ints) const ENTER; SAVETMPS; PUSHMARK(SP); - AV* av = newAV(); +//############################################################################################################## for (int i : ints) - av_push(av, newSViv(i)); - XPUSHs(av); + { + XPUSHs(sv_2mortal(newSViv(i))); + } + +// AV* av = newAV(); +// for (int i : ints) +// av_push(av, newSViv(i)); +// XPUSHs(av); +//############################################################################################################## PUTBACK; perl_call_sv(SvRV((SV*)m_callback), G_DISCARD); FREETMPS; LEAVE; } -*/ #ifdef WIN32 #ifndef NOMINMAX |