Add some missing SWIGINTERN usage
This commit is contained in:
parent
6ec243c093
commit
d9db3cf628
6 changed files with 21 additions and 11 deletions
|
|
@ -10,14 +10,17 @@
|
|||
|
||||
%fragment("<string>");
|
||||
%{
|
||||
SWIGINTERN
|
||||
double SwigSvToNumber(SV* sv) {
|
||||
return SvIOK(sv) ? double(SvIVX(sv)) : SvNVX(sv);
|
||||
}
|
||||
SWIGINTERN
|
||||
std::string SwigSvToString(SV* sv) {
|
||||
STRLEN len;
|
||||
char *ptr = SvPV(sv, len);
|
||||
return std::string(ptr, len);
|
||||
}
|
||||
SWIGINTERN
|
||||
void SwigSvFromString(SV* sv, const std::string& s) {
|
||||
sv_setpvn(sv,s.data(),s.size());
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue