Add R 2.7 calls
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk@10392 626c5289-ae23-0410-ae9c-e8d60b6d4f22
This commit is contained in:
parent
ade41d0a72
commit
25f30ff1b1
1 changed files with 3 additions and 1 deletions
|
|
@ -164,12 +164,14 @@ SWIG_FromCharPtrAndSize(const char* carray, size_t size)
|
|||
{
|
||||
SEXP t, c;
|
||||
if (!carray) return R_NilValue;
|
||||
RVERSION27(return Rf_mkCharLen(carray, size));
|
||||
RVERSIONPRE27(
|
||||
Rf_protect(t = Rf_allocVector(STRSXP, 1));
|
||||
c = allocString(size);
|
||||
strncpy((char *)CHAR(c), carray, size);
|
||||
SET_STRING_ELT(t, 0, c);
|
||||
Rf_unprotect(1);
|
||||
return t;
|
||||
return t;)
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue