Add some missing SWIGINTERN usage
This commit is contained in:
parent
6ec243c093
commit
d9db3cf628
6 changed files with 21 additions and 11 deletions
|
|
@ -14,7 +14,8 @@
|
||||||
%{
|
%{
|
||||||
#include <string>
|
#include <string>
|
||||||
|
|
||||||
inline std::string SWIG_scm2string(SCM x) {
|
SWIGINTERNINLINE
|
||||||
|
std::string SWIG_scm2string(SCM x) {
|
||||||
char* temp;
|
char* temp;
|
||||||
temp = SWIG_scm2str(x);
|
temp = SWIG_scm2str(x);
|
||||||
std::string s(temp);
|
std::string s(temp);
|
||||||
|
|
|
||||||
|
|
@ -11,10 +11,13 @@
|
||||||
%{
|
%{
|
||||||
#include <string>
|
#include <string>
|
||||||
|
|
||||||
std::string swig_scm_to_string(Scheme_Object* x) {
|
SWIGINTERNINLINE
|
||||||
|
std::string swig_scm_to_string(Scheme_Object *x) {
|
||||||
return std::string(SCHEME_STR_VAL(x));
|
return std::string(SCHEME_STR_VAL(x));
|
||||||
}
|
}
|
||||||
Scheme_Object* swig_make_string(const std::string& s) {
|
|
||||||
|
SWIGINTERNINLINE
|
||||||
|
Scheme_Object *swig_make_string(const std::string &s) {
|
||||||
return scheme_make_string(s.c_str());
|
return scheme_make_string(s.c_str());
|
||||||
}
|
}
|
||||||
%}
|
%}
|
||||||
|
|
|
||||||
|
|
@ -10,10 +10,13 @@
|
||||||
|
|
||||||
%{
|
%{
|
||||||
#include <string>
|
#include <string>
|
||||||
CAML_VALUE SwigString_FromString(const std::string& s) {
|
SWIGINTERNINLINE
|
||||||
return caml_val_string((char *)s.c_str());
|
CAML_VALUE SwigString_FromString(const std::string &s) {
|
||||||
}
|
return caml_val_string((char *)s.c_str());
|
||||||
std::string SwigString_AsString(CAML_VALUE o) {
|
}
|
||||||
return std::string((char *)caml_ptr_val(o,0));
|
|
||||||
}
|
SWIGINTERNINLINE
|
||||||
|
std::string SwigString_AsString(CAML_VALUE o) {
|
||||||
|
return std::string((char *)caml_ptr_val(o,0));
|
||||||
|
}
|
||||||
%}
|
%}
|
||||||
|
|
|
||||||
|
|
@ -10,14 +10,17 @@
|
||||||
|
|
||||||
%fragment("<string>");
|
%fragment("<string>");
|
||||||
%{
|
%{
|
||||||
|
SWIGINTERN
|
||||||
double SwigSvToNumber(SV* sv) {
|
double SwigSvToNumber(SV* sv) {
|
||||||
return SvIOK(sv) ? double(SvIVX(sv)) : SvNVX(sv);
|
return SvIOK(sv) ? double(SvIVX(sv)) : SvNVX(sv);
|
||||||
}
|
}
|
||||||
|
SWIGINTERN
|
||||||
std::string SwigSvToString(SV* sv) {
|
std::string SwigSvToString(SV* sv) {
|
||||||
STRLEN len;
|
STRLEN len;
|
||||||
char *ptr = SvPV(sv, len);
|
char *ptr = SvPV(sv, len);
|
||||||
return std::string(ptr, len);
|
return std::string(ptr, len);
|
||||||
}
|
}
|
||||||
|
SWIGINTERN
|
||||||
void SwigSvFromString(SV* sv, const std::string& s) {
|
void SwigSvFromString(SV* sv, const std::string& s) {
|
||||||
sv_setpvn(sv,s.data(),s.size());
|
sv_setpvn(sv,s.data(),s.size());
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -18,7 +18,7 @@ SWIG_pchar_descriptor(void)
|
||||||
}
|
}
|
||||||
|
|
||||||
%fragment("SWIG_strnlen","header",fragment="SWIG_FromCharPtrAndSize") {
|
%fragment("SWIG_strnlen","header",fragment="SWIG_FromCharPtrAndSize") {
|
||||||
size_t
|
SWIGINTERN size_t
|
||||||
SWIG_strnlen(const char* s, size_t maxlen)
|
SWIG_strnlen(const char* s, size_t maxlen)
|
||||||
{
|
{
|
||||||
const char *p;
|
const char *p;
|
||||||
|
|
|
||||||
|
|
@ -19,7 +19,7 @@ SWIG_pwchar_descriptor()
|
||||||
}
|
}
|
||||||
|
|
||||||
%fragment("SWIG_wcsnlen","header",fragment="SWIG_FromWCharPtrAndSize") {
|
%fragment("SWIG_wcsnlen","header",fragment="SWIG_FromWCharPtrAndSize") {
|
||||||
size_t
|
SWIGINTERN size_t
|
||||||
SWIG_wcsnlen(const wchar_t* s, size_t maxlen)
|
SWIG_wcsnlen(const wchar_t* s, size_t maxlen)
|
||||||
{
|
{
|
||||||
const wchar_t *p;
|
const wchar_t *p;
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue