2
/* Null terminated Unicode strings */
3
%typemap(in) wchar_t * %{
4
$1 = Tcl_GetUnicode($input);
6
%typemap(out) UCS2 * %{
7
if($1 == NULL) result = "";
8
Tcl_SetObjResult(interp,Tcl_NewUnicodeObj($1,uninum_utf16len($1)));
10
/* This causes swig to generate code to free the result, preventing a memory leak. */
11
%newobject WNStrToUNStr;
12
%newobject UNStrToWNStr;
13
%newobject Tcl_ListNumberSystems;
14
%newobject UninumNumberSystemMaximumValue;
16
/* Includes the header in the wrapper code */
20
extern char *UNStrToWNStr(wchar_t *,char *);
21
extern UCS2 *WNStrToUNStr(char *,char *);
22
extern char *StrGuessNumberSystem(wchar_t *);
23
extern char *Tcl_ListNumberSystems (int);
24
extern char *UninumNumberSystemMaximumValue(char *);
25
extern char *uninum_version(void);
29
extern char *UNStrToWNStr(wchar_t *,char *);
30
extern UCS2 *WNStrToUNStr(char *,char *);
31
extern char *StrGuessNumberSystem(wchar_t *);
32
extern char *Tcl_ListNumberSystems (int);
33
extern char *uninum_version(void);
34
extern char *UninumNumberSystemMaximumValue(char *);
36
extern int uninum_err;
37
extern short uninum_ns_type;
38
extern UCS2 tcl_uninum_badchar;
39
extern int Uninum_Input_Base;
40
extern int Uninum_Output_Base;
41
extern int Uninum_Output_General_Group_Size;
42
extern int Uninum_Output_First_Group_Size;
43
extern int Uninum_Generate_Roman_With_Bar_P;
44
extern UCS2 Uninum_Output_Group_Separator;