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

« back to all changes in this revision

Viewing changes to Source/CParse/templ.c

  • Committer: Bazaar Package Importer
  • Author(s): Benjamin Drung
  • Date: 2009-11-15 14:00:28 UTC
  • mfrom: (1.2.9 upstream) (2.1.4 squeeze)
  • Revision ID: james.westby@ubuntu.com-20091115140028-me7amr2rie8zz1xn
Tags: 1.3.40-2ubuntu1
* Merge from Debian testing (LP: #356529), remaining changes:
  - Drop libchicken-dev from the build-depends (it's in universe)
  - Remove Pike from package description and from configure flags
  - drop "--without-mzscheme", we don't have it in our build-depends
  - use php-config5
  - Clean Runtime/ as well.
  - debian/rules (clean): Remove Lib/ocaml/swigp4.ml.
* debian/rules: Remove hardcoded python version.
* Remove upper limit for python from Build-Depends.

Show diffs side-by-side

added added

removed removed

Lines of Context:
7
7
 * Expands a template into a specialized version.   
8
8
 * ----------------------------------------------------------------------------- */
9
9
 
10
 
char cvsroot_templ_c[] = "$Id: templ.c 10540 2008-06-21 15:23:02Z wsfulton $";
 
10
char cvsroot_templ_c[] = "$Id: templ.c 11097 2009-01-30 10:27:37Z bhy $";
11
11
 
12
12
#include "swig.h"
13
13
#include "cparse.h"
15
15
static int template_debug = 0;
16
16
 
17
17
 
18
 
String *baselists[3];
 
18
const char *baselists[3];
19
19
 
20
20
void SwigType_template_init() {
21
21
  baselists[0] = "baselist";
167
167
    add_parms(Getattr(n, "throws"), cpatchlist, typelist);
168
168
  } else if (Equal(nodeType, "destructor")) {
169
169
    String *name = Getattr(n, "name");
170
 
    if (name && strchr(Char(name), '<')) {
171
 
      Append(patchlist, Getattr(n, "name"));
172
 
    } else {
173
 
      Append(name, templateargs);
 
170
    if (name) {
 
171
      if (strchr(Char(name), '<'))
 
172
        Append(patchlist, Getattr(n, "name"));
 
173
      else
 
174
        Append(name, templateargs);
174
175
    }
175
176
    name = Getattr(n, "sym:name");
176
 
    if (name && strchr(Char(name), '<')) {
177
 
      String *sn = Copy(tname);
178
 
      Setattr(n, "sym:name", sn);
179
 
      Delete(sn);
180
 
    } else {
181
 
      Replace(name, tname, rname, DOH_REPLACE_ANY);
 
177
    if (name) {
 
178
      if (strchr(Char(name), '<')) {
 
179
        String *sn = Copy(tname);
 
180
        Setattr(n, "sym:name", sn);
 
181
        Delete(sn);
 
182
      } else {
 
183
        Replace(name, tname, rname, DOH_REPLACE_ANY);
 
184
      }
182
185
    }
183
186
    /* Setattr(n,"sym:name",name); */
184
187
    Append(cpatchlist, Getattr(n, "code"));