~ubuntu-branches/ubuntu/quantal/znc/quantal-backports

« back to all changes in this revision

Viewing changes to modules/modpython/cstring.i

  • Committer: Package Import Robot
  • Author(s): Micah Gersten
  • Date: 2013-01-01 19:39:47 UTC
  • mfrom: (21.1.4 experimental)
  • Revision ID: package-import@ubuntu.com-20130101193947-zlqyse3v2mjxnhvw
Tags: 1.0-2~ubuntu12.10.1
No-change backport to quantal (LP: #1085731)

Show diffs side-by-side

added added

removed removed

Lines of Context:
11
11
%}
12
12
 
13
13
%feature("naturalvar") CString;
14
 
class CString;
 
14
class CString {
 
15
public:
 
16
typedef size_t size_type;
 
17
};
15
18
 
16
19
/*@SWIG:/usr/share/swig1.3/typemaps/std_strings.swg,74,%typemaps_std_string@*/
17
20
 
69
72
}
70
73
/*@SWIG@*/
71
74
/*@SWIG:/usr/share/swig1.3/typemaps/std_strings.swg,38,%std_string_from@*/
72
 
%fragment("SWIG_" "From" "_" {CString},"header",fragment="SWIG_FromCharPtrAndSize") {
 
75
%fragment("SWIG_" "From" "_" {CString},"header",fragment="SWIG_FromCharPtrAndSize",fragment="StdTraits") {
73
76
SWIGINTERNINLINE PyObject *
74
77
SWIG_From_std_string  (const CString& s)
75
78
{
82
85
}
83
86
/*@SWIG@*/
84
87
 
 
88
%fragment("StdTraitsCString","header",fragment="SWIG_From_CString") {
 
89
    namespace swig {
 
90
       template<> struct traits_from<CString> {
 
91
           static PyObject *from(const CString& s) {
 
92
               return SWIG_From_std_string(s);
 
93
           }
 
94
       };
 
95
    }
 
96
}
 
97
 
 
98
 
85
99
/*@SWIG:/usr/share/swig1.3/typemaps/ptrtypes.swg,204,%typemaps_asptrfromn@*/
86
100
/*@SWIG:/usr/share/swig1.3/typemaps/ptrtypes.swg,193,%typemaps_asptrfrom@*/
87
101
  /*@SWIG:/usr/share/swig1.3/typemaps/ptrtypes.swg,163,%typemaps_asptr@*/
104
118
    }
105
119
  }
106
120
  /*@SWIG:/usr/share/swig1.3/typemaps/ptrtypes.swg,31,%ptr_in_typemap@*/
107
 
  %typemap(in,fragment="SWIG_" "AsPtr" "_" {CString}) CString {
 
121
  %typemap(in,fragment="SWIG_" "AsPtr" "_" {CString},fragment="StdTraitsCString") CString {
108
122
    CString *ptr = (CString *)0;
109
123
    int res = SWIG_AsPtr_std_string($input, &ptr);
110
124
    if (!SWIG_IsOK(res) || !ptr) {
329
343
/*@SWIG@*/;
330
344
 
331
345
 
332