~ubuntu-branches/ubuntu/quantal/swig2.0/quantal

« back to all changes in this revision

Viewing changes to Lib/d/dprimitives.swg

  • Committer: Package Import Robot
  • Author(s): Stefano Rivera
  • Date: 2012-06-01 17:05:17 UTC
  • mfrom: (1.1.6) (10.1.9 sid)
  • Revision ID: package-import@ubuntu.com-20120601170517-q0ik32ij61i4r6f0
Tags: 2.0.7-2ubuntu1
* Merge from Debian unstable (LP: #1006387). Remaining changes:
  - Drop libchicken-dev from the build-depends (in universe).

Show diffs side-by-side

added added

removed removed

Lines of Context:
4
4
 * Typemaps for primitive types.
5
5
 * ----------------------------------------------------------------------------- */
6
6
 
 
7
// C long/ulong width depends on the target arch, use stdlib aliases for them.
 
8
#if (SWIG_D_VERSION == 1)
 
9
%pragma(d) imdmoduleimports = "static import tango.stdc.config;"
 
10
%pragma(d) globalproxyimports = "static import tango.stdc.config;"
 
11
#define SWIG_LONG_DTYPE tango.stdc.config.c_long
 
12
#define SWIG_ULONG_DTYPE tango.stdc.config.c_ulong
 
13
#else
 
14
%pragma(d) imdmoduleimports = "static import core.stdc.config;"
 
15
%pragma(d) globalproxyimports = "static import core.stdc.config;"
 
16
#define SWIG_LONG_DTYPE core.stdc.config.c_long
 
17
#define SWIG_ULONG_DTYPE core.stdc.config.c_ulong
 
18
#endif
 
19
 
7
20
/*
8
21
 * The SWIG_D_PRIMITIVE macro is used to define the typemaps for the primitive
9
22
 * types, because are more or less the same for all of them. The few special
25
38
%{ temp = ($*1_ltype)$input;
26
39
   $1 = &temp; %}
27
40
%typemap(out) const TYPE & "$result = *$1;"
28
 
%typemap(directorin) const TYPE & "$input = $1_name;"
 
41
%typemap(directorin) const TYPE & "$input = $1;"
29
42
%typemap(directorout,warning=SWIGWARN_TYPEMAP_THREAD_UNSAFE_MSG) const TYPE &
30
43
%{ static $*1_ltype temp;
31
44
   temp = ($*1_ltype)$input;
49
62
SWIG_D_PRIMITIVE(unsigned short, ushort)
50
63
SWIG_D_PRIMITIVE(int, int)
51
64
SWIG_D_PRIMITIVE(unsigned int, uint)
52
 
SWIG_D_PRIMITIVE(long, int)
53
 
SWIG_D_PRIMITIVE(unsigned long, uint)
 
65
SWIG_D_PRIMITIVE(long, SWIG_LONG_DTYPE)
 
66
SWIG_D_PRIMITIVE(unsigned long, SWIG_ULONG_DTYPE)
54
67
SWIG_D_PRIMITIVE(size_t, size_t)
55
68
SWIG_D_PRIMITIVE(long long, long)
56
69
SWIG_D_PRIMITIVE(unsigned long long, ulong)