Fix for handling strings with zero bytes from Stephen Hutsal.
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk@9387 626c5289-ae23-0410-ae9c-e8d60b6d4f22
This commit is contained in:
parent
716f4d5f6f
commit
62949e02e3
2 changed files with 5 additions and 1 deletions
|
|
@ -1,6 +1,9 @@
|
||||||
Version 1.3.30 (in progress)
|
Version 1.3.30 (in progress)
|
||||||
============================
|
============================
|
||||||
|
|
||||||
|
10/03/2006: olly
|
||||||
|
[Perl] Fix for handling strings with zero bytes from Stephen Hutsal.
|
||||||
|
|
||||||
09/30/2006: efuzzyone
|
09/30/2006: efuzzyone
|
||||||
[CFFI] Bitfield support and vararg support due to Arthur Smyles.
|
[CFFI] Bitfield support and vararg support due to Arthur Smyles.
|
||||||
C expression to Lisp conversion, thanks to Arthur Smyles for the initial
|
C expression to Lisp conversion, thanks to Arthur Smyles for the initial
|
||||||
|
|
|
||||||
|
|
@ -19,7 +19,8 @@ double SwigSvToNumber(SV* sv) {
|
||||||
}
|
}
|
||||||
std::string SwigSvToString(SV* sv) {
|
std::string SwigSvToString(SV* sv) {
|
||||||
STRLEN len;
|
STRLEN len;
|
||||||
return SvPV(sv,len);
|
char *ptr = SvPV(sv, len);
|
||||||
|
return std::string(ptr, len);
|
||||||
}
|
}
|
||||||
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());
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue