mirror of
https://github.com/SoftFever/OrcaSlicer.git
synced 2025-08-07 05:54:03 -06:00
Replace to_SV_ref() and to_SV_clone_ref() with templated glue functions
This commit is contained in:
parent
f76e2c2222
commit
76a8ec3d9e
54 changed files with 39 additions and 254 deletions
|
@ -1,7 +1,4 @@
|
|||
#include "Surface.hpp"
|
||||
#ifdef SLIC3RXS
|
||||
#include "perlglue.hpp"
|
||||
#endif
|
||||
|
||||
namespace Slic3r {
|
||||
|
||||
|
@ -54,20 +51,6 @@ Surface::from_SV_check(SV* surface_sv)
|
|||
// a XS Surface was supplied
|
||||
*this = *(Surface *)SvIV((SV*)SvRV( surface_sv ));
|
||||
}
|
||||
|
||||
SV*
|
||||
Surface::to_SV_ref() {
|
||||
SV* sv = newSV(0);
|
||||
sv_setref_pv( sv, perl_class_name_ref(this), (void*)this );
|
||||
return sv;
|
||||
}
|
||||
|
||||
SV*
|
||||
Surface::to_SV_clone_ref() const {
|
||||
SV* sv = newSV(0);
|
||||
sv_setref_pv( sv, perl_class_name(this), new Surface(*this) );
|
||||
return sv;
|
||||
}
|
||||
#endif
|
||||
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue