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

« back to all changes in this revision

Viewing changes to Examples/php4/cpointer/example.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:
 
1
/* File : example.i */
 
2
%module example
 
3
 
 
4
/* This example illustrates a couple of different techniques
 
5
   for manipulating C pointers */
 
6
 
 
7
/* First we'll use the pointer library */
 
8
extern void add(int *x, int *y, int *result);
 
9
 
 
10
%include cpointer.i
 
11
%pointer_functions(int, intp);
 
12
 
 
13
/* Next we'll use some typemaps */
 
14
 
 
15
%include typemaps.i
 
16
extern void sub(int *INPUT, int *INPUT, int *OUTPUT);
 
17
 
 
18
/* Next we'll use typemaps and the %apply directive */
 
19
 
 
20
//%apply int *OUTPUT { int *r };
 
21
//extern int divide(int n, int d, int *r);
 
22
 
 
23
 
 
24
 
 
25
 
 
26