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

« back to all changes in this revision

Viewing changes to Examples/xml/example_inl.expected-xml

  • 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:
9
9
          <swig:module name="example"  />
10
10
          <swig:insert >
11
11
            <swigxml:code >
12
 
 
13
 
#include "example.h"
 
12
 
 
13
#include "example.h"
14
14
            </swigxml:code>
15
15
          </swig:insert>
16
16
          <c:function name="dot_product" >
47
47
          </c:function>
48
48
          <swig:insert >
49
49
            <swigxml:code >
50
 
 
51
 
 
52
 
Vector *new_Vector(double x, double y, double z) {
53
 
   Vector *v = (Vector *) malloc(sizeof(Vector));
54
 
   v->x = x;
55
 
   v->y = y;
56
 
   v->z = z;
57
 
   return v;
58
 
}
59
 
 
60
 
void vector_print(Vector *v) {
61
 
  printf("Vector %x = (%g, %g, %g)\n", v, v->x, v->y, v->z);
62
 
}
 
50
 
 
51
 
 
52
Vector *new_Vector(double x, double y, double z) {
 
53
   Vector *v = (Vector *) malloc(sizeof(Vector));
 
54
   v->x = x;
 
55
   v->y = y;
 
56
   v->z = z;
 
57
   return v;
 
58
}
 
59
 
 
60
void vector_print(Vector *v) {
 
61
  printf("Vector %x = (%g, %g, %g)\n", v, v->x, v->y, v->z);
 
62
}
63
63
            </swigxml:code>
64
64
          </swig:insert>
65
65
          <c:function name="new_Vector" >
75
75
              </swigxml:parm>
76
76
            </swigxml:parms>
77
77
            <swigxml:code >
78
 
{
79
 
   Vector *v = (Vector *) malloc(sizeof(Vector));
80
 
   v->x = x;
81
 
   v->y = y;
82
 
   v->z = z;
83
 
   return v;
 
78
{
 
79
   Vector *v = (Vector *) malloc(sizeof(Vector));
 
80
   v->x = x;
 
81
   v->y = y;
 
82
   v->z = z;
 
83
   return v;
84
84
}            </swigxml:code>
85
85
            <swigxml:type string="p.Vector"  />
86
86
          </c:function>
91
91
              </swigxml:parm>
92
92
            </swigxml:parms>
93
93
            <swigxml:code >
94
 
{
95
 
  printf("Vector %x = (%g, %g, %g)\n", v, v->x, v->y, v->z);
 
94
{
 
95
  printf("Vector %x = (%g, %g, %g)\n", v, v->x, v->y, v->z);
96
96
}            </swigxml:code>
97
97
            <swigxml:type string="void"  />
98
98
          </c:function>