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

« back to all changes in this revision

Viewing changes to Lib/python/std_string.i

  • Committer: Bazaar Package Importer
  • Author(s): Adam Conrad
  • Date: 2005-12-05 01:16:04 UTC
  • mfrom: (1.2.2 upstream)
  • Revision ID: james.westby@ubuntu.com-20051205011604-ygx904it6413k3go
Tags: 1.3.27-1ubuntu1
Resynchronise with Debian again, for the new subversion packages.

Show diffs side-by-side

added added

removed removed

Lines of Context:
51
51
 
52
52
%fragment(SWIG_From_frag(std::string),"header",
53
53
          fragment="SWIG_FromCharArray") {
54
 
SWIGINTERNSHORT PyObject*
 
54
SWIGINTERNINLINE PyObject*
55
55
  SWIG_From(std::string)(const std::string& s)
56
56
  {
57
57
    return SWIG_FromCharArray(s.data(), s.size());
65
65
  {
66
66
    std::string* s;
67
67
    int res = SWIG_AsPtr(std::string)(obj, &s);
68
 
    if (res && s) {
 
68
    if ((res != 0) && s) {
69
69
      if (val) *val = *s;
70
70
      if (res == SWIG_NEWOBJ) delete s;
71
71
      return res;