~ubuntu-branches/ubuntu/maverick/swig1.3/maverick

« back to all changes in this revision

Viewing changes to Lib/r/rfragments.swg

  • Committer: Bazaar Package Importer
  • Author(s): Michael Vogt
  • Date: 2008-11-10 16:29:56 UTC
  • mfrom: (1.2.8 upstream) (2.1.3 lenny)
  • Revision ID: james.westby@ubuntu.com-20081110162956-xue6itkuqhbza87s
Tags: 1.3.36-1ubuntu1
* Merge from debian unstable, remaining changes:
  - Drop pike and libchicken-dev from the build-depends 
    (both are universe)
  - Use python2.5 instead of python2.4.
  - use php5
  - Clean Runtime/ as well.
  - debian/Rules (clean): Remove Lib/ocaml/swigp4.ml.
  - drop "--without-mzscheme", we don't have it in our build-depends

Show diffs side-by-side

added added

removed removed

Lines of Context:
164
164
{
165
165
  SEXP t, c;
166
166
  if (!carray) return R_NilValue;
167
 
  RVERSION26(return Rf_mkCharEnc(carray, size));
168
 
  RVERSIONPRE26(
169
167
  Rf_protect(t = Rf_allocVector(STRSXP, 1));
170
 
  c = allocString(size);
171
 
  strncpy(CHAR(c), carray, size);
 
168
  c = Rf_allocVector(CHARSXP, size);
 
169
  strncpy((char *)CHAR(c), carray, size);
172
170
  SET_STRING_ELT(t, 0, c);
173
 
  Rf_unprotect(1);)
 
171
  Rf_unprotect(1);
174
172
  return t;
175
173
}
176
174
}
177