… | |
… | |
220 | |
220 | |
221 | template<class T> |
221 | template<class T> |
222 | inline void sv_to (SV *sv, refptr<T> &v) { T *tmp; sv_to (sv, tmp); v = tmp; } |
222 | inline void sv_to (SV *sv, refptr<T> &v) { T *tmp; sv_to (sv, tmp); v = tmp; } |
223 | |
223 | |
224 | template<int N> |
224 | template<int N> |
225 | 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]) { assign (v, SvPV_nolen (sv)); } |
226 | |
226 | |
227 | static SV * |
227 | static SV * |
228 | newSVdt_va (va_list &ap, data_type type) |
228 | newSVdt_va (va_list &ap, data_type type) |
229 | { |
229 | { |
230 | SV *sv; |
230 | SV *sv; |