File: char_constant.i

package info (click to toggle)
swig 4.3.0-1
  • links: PTS, VCS
  • area: main
  • in suites: trixie
  • size: 46,232 kB
  • sloc: cpp: 54,631; ansic: 29,122; java: 17,530; python: 12,505; cs: 10,369; ruby: 7,232; yacc: 6,477; makefile: 5,965; javascript: 5,520; sh: 5,415; perl: 4,187; php: 3,693; ml: 2,187; lisp: 2,056; tcl: 1,991; xml: 115
file content (53 lines) | stat: -rw-r--r-- 1,339 bytes parent folder | download | duplicates (3)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
/* This interface file tests whether character constants are correctly
   wrapped as procedures returning Scheme characters (rather than
   Scheme strings). 
*/

%module char_constant

#define CHAR_CONSTANT 'x'

#define STRING_CONSTANT "xyzzy"

#define ESC_CONST  '\1'
#define NULL_CONST '\0'
#define SPECIALCHAR ''
#define SPECIALCHAR2 '\n'
#define SPECIALCHARA 'A'
#define SPECIALCHARB '\102' // B
#define SPECIALCHARC '\x43' // C
#define SPECIALCHARD 0x44 // D
#define SPECIALCHARE 69 // E
#define SPECIALCHARAE1 '' // AE (latin1 encoded)
#define SPECIALCHARAE2 '\306' // AE (latin1 encoded)
#define SPECIALCHARAE3 '\xC6' // AE (latin1 encoded)
#define SPECIALCHARPAREN (';')

#if defined(SWIGJAVA)
%javaconst(1);
#elif SWIGCSHARP
%csconst(1);
#elif SWIGD
%dmanifestconst;
#endif

#define X_ESC_CONST  '\1'
#define X_NULL_CONST '\0'
#define X_SPECIALCHAR ''
#define X_SPECIALCHAR2 '\n'
#define X_SPECIALCHARA 'A'
#define X_SPECIALCHARB '\102' // B
#define X_SPECIALCHARC '\x43' // C
#define X_SPECIALCHARD 0x44 // D
#define X_SPECIALCHARE 69 // E
#define X_SPECIALCHARAE1 '' // AE (latin1 encoded)
#define X_SPECIALCHARAE2 '\306' // AE (latin1 encoded)
#define X_SPECIALCHARAE3 '\xC6' // AE (latin1 encoded)
#define X_SPECIALCHARPAREN (';')

%inline 
{
  const int ia = (int)'a';
  const int ib = 'b';
  const int iparen = (';');
}