… | |
… | |
215 | inline void sv_to (SV *sv, region * &v) { v = (region *)SvPTR_ornull (sv, "cf::region"); } |
215 | inline void sv_to (SV *sv, region * &v) { v = (region *)SvPTR_ornull (sv, "cf::region"); } |
216 | inline void sv_to (SV *sv, living * &v) { v = (living *)SvPTR_ornull (sv, "cf::living"); } |
216 | inline void sv_to (SV *sv, living * &v) { v = (living *)SvPTR_ornull (sv, "cf::living"); } |
217 | |
217 | |
218 | inline void sv_to (SV *sv, New_Face * &v) { v = &new_faces[FindFace (SvPV_nolen (sv), 0)]; } //TODO |
218 | inline void sv_to (SV *sv, New_Face * &v) { v = &new_faces[FindFace (SvPV_nolen (sv), 0)]; } //TODO |
219 | inline void sv_to (SV *sv, treasurelist * &v) { v = find_treasurelist (SvPV_nolen (sv)); } // TODO |
219 | inline void sv_to (SV *sv, treasurelist * &v) { v = find_treasurelist (SvPV_nolen (sv)); } // TODO |
|
|
220 | |
|
|
221 | template<class T> |
|
|
222 | inline void sv_to (SV *sv, refptr<T> &v) { T *tmp; sv_to (sv, tmp); v = tmp; } |
220 | |
223 | |
221 | template<int N> |
224 | template<int N> |
222 | inline void sv_to (SV *sv, char (&v)[N]) { snprintf (v, N, "%s", SvPV_nolen (sv)); } |
225 | inline void sv_to (SV *sv, char (&v)[N]) { snprintf (v, N, "%s", SvPV_nolen (sv)); } |
223 | |
226 | |
224 | static SV * |
227 | static SV * |