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

« back to all changes in this revision

Viewing changes to Source/Modules/modula3.cxx

  • Committer: Bazaar Package Importer
  • Author(s): Matthias Klose
  • Date: 2007-12-06 10:27:08 UTC
  • mfrom: (1.2.6 upstream)
  • Revision ID: james.westby@ubuntu.com-20071206102708-t37t62i45n595w0e
Tags: 1.3.33-2ubuntu1
* Merge with Debian; remaining changes:
  - Drop support for pike.
  - Use python2.5 instead of python2.4.
  - Clean Runtime/ as well.
  - Force a few environment variables.
* debian/Rules (clean): Remove Lib/ocaml/swigp4.ml.

Show diffs side-by-side

added added

removed removed

Lines of Context:
7
7
 * Modula3 language module for SWIG.
8
8
 * ----------------------------------------------------------------------------- */
9
9
 
10
 
char cvsroot_modula3_cxx[] = "$Header: /cvsroot/swig/SWIG/Source/Modules/modula3.cxx,v 1.26 2006/11/15 23:45:47 wsfulton Exp $";
 
10
char cvsroot_modula3_cxx[] = "$Id: modula3.cxx 10003 2007-10-17 21:42:11Z wsfulton $";
11
11
 
12
12
/*
13
13
  Text formatted with
140
140
    block_type bt;
141
141
    /* VC++ 6 doesn't allow the access to 'no_block'
142
142
       if it is a private member of MODULA3 class */
143
 
     M3File():f(NewString("")), import(NewHash()), bt(no_block) {
144
 
    };
 
143
    M3File():f(NewString("")), import(NewHash()), bt(no_block) {
 
144
    }
145
145
    ~M3File() {
146
146
      Delete(f);
147
147
      Delete(import);
148
 
    };
 
148
    }
149
149
 
150
150
    /* -----------------------------------------------------------------------------
151
151
     * enterBlock()
158
158
#ifdef DEBUG
159
159
      if ((bt < 0) || (4 < bt)) {
160
160
        printf("bt %d out of range\n", bt);
161
 
      };
 
161
      }
162
162
#endif
163
163
      if (newbt != bt) {
164
164
        Append(f, ident[newbt]);
165
165
        bt = newbt;
166
 
      };
167
 
    };
 
166
      }
 
167
    }
168
168
 
169
169
  };
170
170
 
651
651
    String *mode, *name, *type, *value;
652
652
    bool hold;
653
653
     writeArgState():mode(NIL), name(NIL), type(NIL), value(NIL), hold(false) {
654
 
    };
 
654
    }
655
655
  };
656
656
 
657
657
  void writeArg(File *f, writeArgState & state, String *mode, String *name, String *type, String *value) {
958
958
 
959
959
    Swig_banner(f_runtime);     // Print the SWIG banner message
960
960
 
961
 
    String *wrapper_name = NewString("");
962
 
 
963
 
    Printf(wrapper_name, "Modula3_%%f", m3raw_name);
964
 
    Swig_name_register((char *) "wrapper", Char(wrapper_name));
 
961
    Swig_name_register((char *) "wrapper", (char *) "Modula3_%f");
965
962
    if (old_variable_names) {
966
963
      Swig_name_register((char *) "set", (char *) "set_%v");
967
964
      Swig_name_register((char *) "get", (char *) "get_%v");
968
965
    }
969
966
 
970
 
    Delete(wrapper_name);
971
 
 
972
967
    Printf(f_wrappers, "\n#ifdef __cplusplus\n");
973
968
    Printf(f_wrappers, "extern \"C\" {\n");
974
969
    Printf(f_wrappers, "#endif\n\n");
2084
2079
              Swig_warning(WARN_MODULA3_BAD_ENUMERATION, input_file, line_number, "Unknown name conversion tag <%s> with value <%s>.\n", tag, data);
2085
2080
            }
2086
2081
            Delete(nameassign);
2087
 
          };
 
2082
          }
2088
2083
          Delete(namedesc);
2089
2084
        }
2090
2085
        const char *stem = Char(name);
3500
3495
      Append(function_code, header);
3501
3496
 
3502
3497
      m3wrap_intf.enterBlock(no_block);
3503
 
      Printf(m3wrap_intf.f, "%s;\n\n", header, NIL);
 
3498
      Printf(m3wrap_intf.f, "%s;\n\n", header);
3504
3499
    }
3505
3500
 
3506
3501
    {