diff options
author | Sam Hartman <hartmans@mit.edu> | 2006-01-11 22:32:31 +0000 |
---|---|---|
committer | Sam Hartman <hartmans@mit.edu> | 2006-01-11 22:32:31 +0000 |
commit | 5b34687c8746762678e96de41a85bc7fc7187dbb (patch) | |
tree | e87c9fca454c3201f6d077c51d0c5d63108b9781 /src/util/profile | |
parent | 95a1115f3d5d582411712d07b77a7df95b912f8a (diff) | |
download | krb5-5b34687c8746762678e96de41a85bc7fc7187dbb.tar.gz krb5-5b34687c8746762678e96de41a85bc7fc7187dbb.tar.xz krb5-5b34687c8746762678e96de41a85bc7fc7187dbb.zip |
Back out unwanted change to profile_tcl.c
git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@17586 dc483132-0cff-0310-8789-dd5450dbe970
Diffstat (limited to 'src/util/profile')
-rw-r--r-- | src/util/profile/profile_tcl.c | 1056 |
1 files changed, 311 insertions, 745 deletions
diff --git a/src/util/profile/profile_tcl.c b/src/util/profile/profile_tcl.c index 71be53135..31a82f1b4 100644 --- a/src/util/profile/profile_tcl.c +++ b/src/util/profile/profile_tcl.c @@ -1,6 +1,6 @@ /* ---------------------------------------------------------------------------- * This file was automatically generated by SWIG (http://www.swig.org). - * Version 1.3.27 + * Version 1.3.21 * * This file is not intended to be easily readable and contains a number of * coding conventions designed to improve portability and efficiency. Do not make @@ -8,113 +8,71 @@ * interface file instead. * ----------------------------------------------------------------------------- */ -/*********************************************************************** +/*************************************************************** -*- c -*- + * Tcl/precommon.swg * - * This section contains generic SWIG labels for method/variable - * declarations/attributes, and other compiler dependent labels. + * Rename all exported symbols from common.swg, to avoid symbol + * clashes if multiple interpreters are included * ************************************************************************/ -/* template workaround for compilers that cannot correctly implement the C++ standard */ -#ifndef SWIGTEMPLATEDISAMBIGUATOR -# if defined(__SUNPRO_CC) && (__SUNPRO_CC <= 0x560) -# define SWIGTEMPLATEDISAMBIGUATOR template -# else -# define SWIGTEMPLATEDISAMBIGUATOR -# endif -#endif - -/* inline attribute */ -#ifndef SWIGINLINE -# if defined(__cplusplus) || (defined(__GNUC__) && !defined(__STRICT_ANSI__)) -# define SWIGINLINE inline -# else -# define SWIGINLINE -# endif -#endif - -/* attribute recognised by some compilers to avoid 'unused' warnings */ -#ifndef SWIGUNUSED -# if defined(__GNUC__) || defined(__ICC) -# define SWIGUNUSED __attribute__ ((unused)) -# else -# define SWIGUNUSED -# endif -#endif - -/* internal SWIG method */ -#ifndef SWIGINTERN -# define SWIGINTERN static SWIGUNUSED -#endif - -/* internal inline SWIG method */ -#ifndef SWIGINTERNINLINE -# define SWIGINTERNINLINE SWIGINTERN SWIGINLINE -#endif - -/* exporting methods for Windows DLLs */ -#ifndef SWIGEXPORT -# if defined(_WIN32) || defined(__WIN32__) || defined(__CYGWIN__) -# if defined(STATIC_LINKED) -# define SWIGEXPORT -# else -# define SWIGEXPORT __declspec(dllexport) -# endif -# else -# define SWIGEXPORT -# endif -#endif - -/* calling conventions for Windows */ -#ifndef SWIGSTDCALL -# if defined(_WIN32) || defined(__WIN32__) || defined(__CYGWIN__) -# define SWIGSTDCALL __stdcall -# else -# define SWIGSTDCALL -# endif -#endif +#define SWIG_TypeRegister SWIG_Tcl_TypeRegister +#define SWIG_TypeCheck SWIG_Tcl_TypeCheck +#define SWIG_TypeCast SWIG_Tcl_TypeCast +#define SWIG_TypeDynamicCast SWIG_Tcl_TypeDynamicCast +#define SWIG_TypeName SWIG_Tcl_TypeName +#define SWIG_TypeQuery SWIG_Tcl_TypeQuery +#define SWIG_TypeClientData SWIG_Tcl_TypeClientData +#define SWIG_PackData SWIG_Tcl_PackData +#define SWIG_UnpackData SWIG_Tcl_UnpackData /*********************************************************************** - * swigrun.swg + * common.swg * - * This file contains generic CAPI SWIG runtime support for pointer - * type checking. + * This file contains generic SWIG runtime support for pointer + * type checking as well as a few commonly used macros to control + * external linkage. * + * Author : David Beazley (beazley@cs.uchicago.edu) + * + * Copyright (c) 1999-2000, The University of Chicago + * + * This file may be freely redistributed without license or fee provided + * this copyright message remains intact. ************************************************************************/ -/* This should only be incremented when either the layout of swig_type_info changes, - or for whatever reason, the runtime changes incompatibly */ -#define SWIG_RUNTIME_VERSION "2" +#include <string.h> -/* define SWIG_TYPE_TABLE_NAME as "SWIG_TYPE_TABLE" */ -#ifdef SWIG_TYPE_TABLE -# define SWIG_QUOTE_STRING(x) #x -# define SWIG_EXPAND_AND_QUOTE_STRING(x) SWIG_QUOTE_STRING(x) -# define SWIG_TYPE_TABLE_NAME SWIG_EXPAND_AND_QUOTE_STRING(SWIG_TYPE_TABLE) +#if defined(_WIN32) || defined(__WIN32__) || defined(__CYGWIN__) +# if defined(_MSC_VER) || defined(__GNUC__) +# if defined(STATIC_LINKED) +# define SWIGEXPORT(a) a +# define SWIGIMPORT(a) extern a +# else +# define SWIGEXPORT(a) __declspec(dllexport) a +# define SWIGIMPORT(a) extern a +# endif +# else +# if defined(__BORLANDC__) +# define SWIGEXPORT(a) a _export +# define SWIGIMPORT(a) a _export +# else +# define SWIGEXPORT(a) a +# define SWIGIMPORT(a) a +# endif +# endif #else -# define SWIG_TYPE_TABLE_NAME +# define SWIGEXPORT(a) a +# define SWIGIMPORT(a) a #endif -/* - You can use the SWIGRUNTIME and SWIGRUNTIMEINLINE macros for - creating a static or dynamic library from the swig runtime code. - In 99.9% of the cases, swig just needs to declare them as 'static'. - - But only do this if is strictly necessary, ie, if you have problems - with your compiler or so. -*/ - -#ifndef SWIGRUNTIME -# define SWIGRUNTIME SWIGINTERN -#endif - -#ifndef SWIGRUNTIMEINLINE -# define SWIGRUNTIMEINLINE SWIGRUNTIME SWIGINLINE +#ifdef SWIG_GLOBAL +# define SWIGRUNTIME(a) SWIGEXPORT(a) +#else +# define SWIGRUNTIME(a) static a #endif -#include <string.h> - #ifdef __cplusplus extern "C" { #endif @@ -122,141 +80,106 @@ extern "C" { typedef void *(*swig_converter_func)(void *); typedef struct swig_type_info *(*swig_dycast_func)(void **); -/* Structure to store inforomation on one type */ typedef struct swig_type_info { - const char *name; /* mangled name of this type */ - const char *str; /* human readable name of this type */ - swig_dycast_func dcast; /* dynamic cast function down a hierarchy */ - struct swig_cast_info *cast; /* linked list of types that can cast into this type */ - void *clientdata; /* language specific type data */ + const char *name; + swig_converter_func converter; + const char *str; + void *clientdata; + swig_dycast_func dcast; + struct swig_type_info *next; + struct swig_type_info *prev; } swig_type_info; -/* Structure to store a type and conversion function used for casting */ -typedef struct swig_cast_info { - swig_type_info *type; /* pointer to type that is equivalent to this type */ - swig_converter_func converter; /* function to cast the void pointers */ - struct swig_cast_info *next; /* pointer to next cast in linked list */ - struct swig_cast_info *prev; /* pointer to the previous cast */ -} swig_cast_info; - -/* Structure used to store module information - * Each module generates one structure like this, and the runtime collects - * all of these structures and stores them in a circularly linked list.*/ -typedef struct swig_module_info { - swig_type_info **types; /* Array of pointers to swig_type_info structures that are in this module */ - size_t size; /* Number of types in this module */ - struct swig_module_info *next; /* Pointer to next element in circularly linked list */ - swig_type_info **type_initial; /* Array of initially generated type structures */ - swig_cast_info **cast_initial; /* Array of initially generated casting structures */ - void *clientdata; /* Language specific module data */ -} swig_module_info; - - -/* - Compare two type names skipping the space characters, therefore - "char*" == "char *" and "Class<int>" == "Class<int >", etc. - - Return 0 when the two name types are equivalent, as in - strncmp, but skipping ' '. -*/ -SWIGRUNTIME int -SWIG_TypeNameComp(const char *f1, const char *l1, - const char *f2, const char *l2) { - for (;(f1 != l1) && (f2 != l2); ++f1, ++f2) { - while ((*f1 == ' ') && (f1 != l1)) ++f1; - while ((*f2 == ' ') && (f2 != l2)) ++f2; - if (*f1 != *f2) return (int)(*f1 - *f2); - } - return (l1 - f1) - (l2 - f2); -} +#ifdef SWIG_NOINCLUDE -/* - Check type equivalence in a name list like <name1>|<name2>|... - Return 0 if not equal, 1 if equal -*/ -SWIGRUNTIME int -SWIG_TypeEquiv(const char *nb, const char *tb) { - int equiv = 0; - const char* te = tb + strlen(tb); - const char* ne = nb; - while (!equiv && *ne) { - for (nb = ne; *ne; ++ne) { - if (*ne == '|') break; - } - equiv = (SWIG_TypeNameComp(nb, ne, tb, te) == 0) ? 1 : 0; - if (*ne) ++ne; - } - return equiv; -} +SWIGIMPORT(swig_type_info *) SWIG_TypeRegister(swig_type_info *); +SWIGIMPORT(swig_type_info *) SWIG_TypeCheck(char *c, swig_type_info *); +SWIGIMPORT(void *) SWIG_TypeCast(swig_type_info *, void *); +SWIGIMPORT(swig_type_info *) SWIG_TypeDynamicCast(swig_type_info *, void **); +SWIGIMPORT(const char *) SWIG_TypeName(const swig_type_info *); +SWIGIMPORT(swig_type_info *) SWIG_TypeQuery(const char *); +SWIGIMPORT(void) SWIG_TypeClientData(swig_type_info *, void *); +SWIGIMPORT(char *) SWIG_PackData(char *, void *, int); +SWIGIMPORT(char *) SWIG_UnpackData(char *, void *, int); -/* - Check type equivalence in a name list like <name1>|<name2>|... - Return 0 if equal, -1 if nb < tb, 1 if nb > tb -*/ -SWIGRUNTIME int -SWIG_TypeCompare(const char *nb, const char *tb) { - int equiv = 0; - const char* te = tb + strlen(tb); - const char* ne = nb; - while (!equiv && *ne) { - for (nb = ne; *ne; ++ne) { - if (*ne == '|') break; - } - equiv = (SWIG_TypeNameComp(nb, ne, tb, te) == 0) ? 1 : 0; - if (*ne) ++ne; - } - return equiv; -} - - -/* think of this as a c++ template<> or a scheme macro */ -#define SWIG_TypeCheck_Template(comparison, ty) \ - if (ty) { \ - swig_cast_info *iter = ty->cast; \ - while (iter) { \ - if (comparison) { \ - if (iter == ty->cast) return iter; \ - /* Move iter to the top of the linked list */ \ - iter->prev->next = iter->next; \ - if (iter->next) \ - iter->next->prev = iter->prev; \ - iter->next = ty->cast; \ - iter->prev = 0; \ - if (ty->cast) ty->cast->prev = iter; \ - ty->cast = iter; \ - return iter; \ - } \ - iter = iter->next; \ - } \ - } \ - return 0 +#else -/* - Check the typename -*/ -SWIGRUNTIME swig_cast_info * -SWIG_TypeCheck(const char *c, swig_type_info *ty) { - SWIG_TypeCheck_Template(strcmp(iter->type->name, c) == 0, ty); +static swig_type_info *swig_type_list = 0; + +/* Register a type mapping with the type-checking */ +SWIGRUNTIME(swig_type_info *) +SWIG_TypeRegister(swig_type_info *ti) { + swig_type_info *tc, *head, *ret, *next; + /* Check to see if this type has already been registered */ + tc = swig_type_list; + while (tc) { + if (strcmp(tc->name, ti->name) == 0) { + /* Already exists in the table. Just add additional types to the list */ + if (tc->clientdata) ti->clientdata = tc->clientdata; + head = tc; + next = tc->next; + goto l1; + } + tc = tc->prev; + } + head = ti; + next = 0; + + /* Place in list */ + ti->prev = swig_type_list; + swig_type_list = ti; + + /* Build linked lists */ + l1: + ret = head; + tc = ti + 1; + /* Patch up the rest of the links */ + while (tc->name) { + head->next = tc; + tc->prev = head; + head = tc; + tc++; + } + if (next) next->prev = head; + head->next = next; + return ret; } -/* Same as previous function, except strcmp is replaced with a pointer comparison */ -SWIGRUNTIME swig_cast_info * -SWIG_TypeCheckStruct(swig_type_info *from, swig_type_info *into) { - SWIG_TypeCheck_Template(iter->type == from, into); +/* Check the typename */ +SWIGRUNTIME(swig_type_info *) +SWIG_TypeCheck(char *c, swig_type_info *ty) { + swig_type_info *s; + if (!ty) return 0; /* Void pointer */ + s = ty->next; /* First element always just a name */ + do { + if (strcmp(s->name,c) == 0) { + if (s == ty->next) return s; + /* Move s to the top of the linked list */ + s->prev->next = s->next; + if (s->next) { + s->next->prev = s->prev; + } + /* Insert s as second element in the list */ + s->next = ty->next; + if (ty->next) ty->next->prev = s; + ty->next = s; + s->prev = ty; + return s; + } + s = s->next; + } while (s && (s != ty->next)); + return 0; } -/* - Cast a pointer up an inheritance hierarchy -*/ -SWIGRUNTIMEINLINE void * -SWIG_TypeCast(swig_cast_info *ty, void *ptr) { - return ((!ty) || (!ty->converter)) ? ptr : (*ty->converter)(ptr); +/* Cast a pointer up an inheritance hierarchy */ +SWIGRUNTIME(void *) +SWIG_TypeCast(swig_type_info *ty, void *ptr) { + if ((!ty) || (!ty->converter)) return ptr; + return (*ty->converter)(ptr); } -/* - Dynamic pointer casting. Down an inheritance hierarchy -*/ -SWIGRUNTIME swig_type_info * +/* Dynamic pointer casting. Down an inheritance hierarchy */ +SWIGRUNTIME(swig_type_info *) SWIG_TypeDynamicCast(swig_type_info *ty, void **ptr) { swig_type_info *lastty = ty; if (!ty || !ty->dcast) return ty; @@ -267,246 +190,95 @@ SWIG_TypeDynamicCast(swig_type_info *ty, void **ptr) { return lastty; } -/* - Return the name associated with this type -*/ -SWIGRUNTIMEINLINE const char * +/* Return the name associated with this type */ +SWIGRUNTIME(const char *) SWIG_TypeName(const swig_type_info *ty) { return ty->name; } -/* - Return the pretty name associated with this type, - that is an unmangled type name in a form presentable to the user. -*/ -SWIGRUNTIME const char * -SWIG_TypePrettyName(const swig_type_info *type) { - /* The "str" field contains the equivalent pretty names of the - type, separated by vertical-bar characters. We choose - to print the last name, as it is often (?) the most - specific. */ - if (type->str != NULL) { - const char *last_name = type->str; - const char *s; - for (s = type->str; *s; s++) - if (*s == '|') last_name = s+1; - return last_name; +/* Search for a swig_type_info structure */ +SWIGRUNTIME(swig_type_info *) +SWIG_TypeQuery(const char *name) { + swig_type_info *ty = swig_type_list; + while (ty) { + if (ty->str && (strcmp(name,ty->str) == 0)) return ty; + if (ty->name && (strcmp(name,ty->name) == 0)) return ty; + ty = ty->prev; } - else - return type->name; + return 0; } -/* - Set the clientdata field for a type -*/ -SWIGRUNTIME void +/* Set the clientdata field for a type */ +SWIGRUNTIME(void) SWIG_TypeClientData(swig_type_info *ti, void *clientdata) { - swig_cast_info *cast = ti->cast; - /* if (ti->clientdata == clientdata) return; */ + swig_type_info *tc, *equiv; + if (ti->clientdata == clientdata) return; ti->clientdata = clientdata; - - while (cast) { - if (!cast->converter) { - swig_type_info *tc = cast->type; - if (!tc->clientdata) { - SWIG_TypeClientData(tc, clientdata); + equiv = ti->next; + while (equiv) { + if (!equiv->converter) { + tc = swig_type_list; + while (tc) { + if ((strcmp(tc->name, equiv->name) == 0)) + SWIG_TypeClientData(tc,clientdata); + tc = tc->prev; } - } - cast = cast->next; - } -} - -/* - Search for a swig_type_info structure only by mangled name - Search is a O(log #types) - - We start searching at module start, and finish searching when start == end. - Note: if start == end at the beginning of the function, we go all the way around - the circular list. -*/ -SWIGRUNTIME swig_type_info * -SWIG_MangledTypeQueryModule(swig_module_info *start, - swig_module_info *end, - const char *name) { - swig_module_info *iter = start; - do { - if (iter->size) { - register size_t l = 0; - register size_t r = iter->size - 1; - do { - /* since l+r >= 0, we can (>> 1) instead (/ 2) */ - register size_t i = (l + r) >> 1; - const char *iname = iter->types[i]->name; - if (iname) { - register int compare = strcmp(name, iname); - if (compare == 0) { - return iter->types[i]; - } else if (compare < 0) { - if (i) { - r = i - 1; - } else { - break; - } - } else if (compare > 0) { - l = i + 1; - } - } else { - break; /* should never happen */ - } - } while (l <= r); } - iter = iter->next; - } while (iter != end); - return 0; -} - -/* - Search for a swig_type_info structure for either a mangled name or a human readable name. - It first searches the mangled names of the types, which is a O(log #types) - If a type is not found it then searches the human readable names, which is O(#types). - - We start searching at module start, and finish searching when start == end. - Note: if start == end at the beginning of the function, we go all the way around - the circular list. -*/ -SWIGRUNTIME swig_type_info * -SWIG_TypeQueryModule(swig_module_info *start, - swig_module_info *end, - const char *name) { - /* STEP 1: Search the name field using binary search */ - swig_type_info *ret = SWIG_MangledTypeQueryModule(start, end, name); - if (ret) { - return ret; - } else { - /* STEP 2: If the type hasn't been found, do a complete search - of the str field (the human readable name) */ - swig_module_info *iter = start; - do { - register size_t i = 0; - for (; i < iter->size; ++i) { - if (iter->types[i]->str && (SWIG_TypeEquiv(iter->types[i]->str, name))) - return iter->types[i]; - } - iter = iter->next; - } while (iter != end); + equiv = equiv->next; } - - /* neither found a match */ - return 0; } - -/* - Pack binary data into a string -*/ -SWIGRUNTIME char * -SWIG_PackData(char *c, void *ptr, size_t sz) { - static const char hex[17] = "0123456789abcdef"; - register const unsigned char *u = (unsigned char *) ptr; - register const unsigned char *eu = u + sz; - for (; u != eu; ++u) { - register unsigned char uu = *u; +/* Pack binary data into a string */ +SWIGRUNTIME(char *) +SWIG_PackData(char *c, void *ptr, int sz) { + static char hex[17] = "0123456789abcdef"; + int i; + unsigned char *u = (unsigned char *) ptr; + register unsigned char uu; + for (i = 0; i < sz; i++,u++) { + uu = *u; *(c++) = hex[(uu & 0xf0) >> 4]; *(c++) = hex[uu & 0xf]; } return c; } -/* - Unpack binary data from a string -*/ -SWIGRUNTIME const char * -SWIG_UnpackData(const char *c, void *ptr, size_t sz) { - register unsigned char *u = (unsigned char *) ptr; - register const unsigned char *eu = u + sz; - for (; u != eu; ++u) { - register char d = *(c++); - register unsigned char uu = 0; +/* Unpack binary data from a string */ +SWIGRUNTIME(char *) +SWIG_UnpackData(char *c, void *ptr, int sz) { + register unsigned char uu = 0; + register int d; + unsigned char *u = (unsigned char *) ptr; + int i; + for (i = 0; i < sz; i++, u++) { + d = *(c++); if ((d >= '0') && (d <= '9')) uu = ((d - '0') << 4); else if ((d >= 'a') && (d <= 'f')) uu = ((d - ('a'-10)) << 4); - else - return (char *) 0; d = *(c++); if ((d >= '0') && (d <= '9')) uu |= (d - '0'); else if ((d >= 'a') && (d <= 'f')) uu |= (d - ('a'-10)); - else - return (char *) 0; *u = uu; } return c; } -/* - Pack 'void *' into a string buffer. -*/ -SWIGRUNTIME char * -SWIG_PackVoidPtr(char *buff, void *ptr, const char *name, size_t bsz) { - char *r = buff; - if ((2*sizeof(void *) + 2) > bsz) return 0; - *(r++) = '_'; - r = SWIG_PackData(r,&ptr,sizeof(void *)); - if (strlen(name) + 1 > (bsz - (r - buff))) return 0; - strcpy(r,name); - return buff; -} - -SWIGRUNTIME const char * -SWIG_UnpackVoidPtr(const char *c, void **ptr, const char *name) { - if (*c != '_') { - if (strcmp(c,"NULL") == 0) { - *ptr = (void *) 0; - return name; - } else { - return 0; - } - } - return SWIG_UnpackData(++c,ptr,sizeof(void *)); -} - -SWIGRUNTIME char * -SWIG_PackDataName(char *buff, void *ptr, size_t sz, const char *name, size_t bsz) { - char *r = buff; - size_t lname = (name ? strlen(name) : 0); - if ((2*sz + 2 + lname) > bsz) return 0; - *(r++) = '_'; - r = SWIG_PackData(r,ptr,sz); - if (lname) { - strncpy(r,name,lname+1); - } else { - *r = 0; - } - return buff; -} - -SWIGRUNTIME const char * -SWIG_UnpackDataName(const char *c, void *ptr, size_t sz, const char *name) { - if (*c != '_') { - if (strcmp(c,"NULL") == 0) { - memset(ptr,0,sz); - return name; - } else { - return 0; - } - } - return SWIG_UnpackData(++c,ptr,sz); -} +#endif #ifdef __cplusplus } #endif /* - * $Header: /cvsroot/swig/SWIG/Lib/tcl/swigtcl8.swg,v 1.28 2005/06/17 23:15:51 marcelomatus Exp $ + * $Header: /cvsroot/SWIG/Lib/tcl/swigtcl8.swg,v 1.19 2003/12/09 12:44:49 beazley Exp $ * * swigtcl8.swg */ #include <tcl.h> -#include <errno.h> #include <stdlib.h> #include <stdarg.h> #include <ctype.h> @@ -565,8 +337,6 @@ typedef struct swig_class { swig_method *methods; swig_attribute *attributes; struct swig_class **bases; - char **base_names; - swig_module_info *module; } swig_class; typedef struct swig_instance { @@ -608,17 +378,34 @@ typedef struct swig_instance { #define SWIG_MethodCommand SWIG_Tcl_MethodCommand #define SWIG_ObjectDelete SWIG_Tcl_ObjectDelete -/* Runtime API */ -#define SWIG_GetModule(clientdata) SWIG_Tcl_GetModule((Tcl_Interp *) (clientdata)) -#define SWIG_SetModule(clientdata, pointer) SWIG_Tcl_SetModule((Tcl_Interp *) (clientdata), pointer) -#define SWIG_MODULE_CLIENTDATA_TYPE Tcl_Interp * +#ifdef SWIG_NOINCLUDE + +SWIGIMPORT(int) SWIG_Tcl_ConvertPtrFromString(Tcl_Interp *, char *, void **, swig_type_info *,int flags); +SWIGIMPORT(int) SWIG_Tcl_ConvertPtr(Tcl_Interp *, Tcl_Obj *, void **, swig_type_info *, int flags); +SWIGIMPORT(int) SWIG_Tcl_ConvertPacked(Tcl_Interp *, Tcl_Obj *, void *, int sz, swig_type_info *, int flags); +SWIGIMPORT(void) SWIG_Tcl_MakePtr(char *, void *, swig_type_info *, int flags); +SWIGIMPORT(Tcl_Obj *) SWIG_Tcl_NewPointerObj(void *, swig_type_info *, int flags); +SWIGIMPORT(Tcl_Obj *) SWIG_Tcl_NewPackedObj(void *, int sz, swig_type_info *, int flags); +SWIGIMPORT(int) SWIG_Tcl_GetArgs(Tcl_Interp *, int, Tcl_Obj *CONST [], const char *, ...); +SWIGIMPORT(char *) SWIG_Tcl_PointerTypeFromString(char *c); +SWIGIMPORT(void) SWIG_Tcl_Acquire(void *ptr); +SWIGIMPORT(int) SWIG_Tcl_Disown(void *ptr); +SWIGIMPORT(int) SWIG_Tcl_Thisown(void *ptr); +SWIGIMPORT(void) SWIG_Tcl_InstallConstants(Tcl_Interp *interp, struct swig_const_info constants[]); +SWIGIMPORT(Tcl_Obj *) SWIG_Tcl_GetConstant(const char *key); +SWIGIMPORT(Tcl_Obj *) SWIG_Tcl_NewInstanceObj(Tcl_Interp *interp, void *, swig_type_info *, int flags); +SWIGIMPORT(int) SWIG_Tcl_ObjectConstructor(ClientData, Tcl_Interp *, int, Tcl_Obj *CONST objv[]); +SWIGIMPORT(int) SWIG_Tcl_MethodCommand(ClientData, Tcl_Interp *, int, Tcl_Obj *CONST objv[]); +SWIGIMPORT(void) SWIG_Tcl_ObjectDelete(ClientData); + +#else /* Object support */ static Tcl_HashTable swigobjectTable; static int swigobjectTableinit = 0; /* Acquire ownership of a pointer */ -static void +SWIGRUNTIME(void) SWIG_Tcl_Acquire(void *ptr) { Tcl_HashEntry *entryPtr; int newobj; @@ -630,7 +417,7 @@ SWIG_Tcl_Acquire(void *ptr) { } /* Disown a pointer. Returns 1 if we owned it to begin with */ -static int +SWIGRUNTIME(int) SWIG_Tcl_Disown(void *ptr) { Tcl_HashEntry *entryPtr; if (!swigobjectTableinit) return 0; @@ -642,7 +429,7 @@ SWIG_Tcl_Disown(void *ptr) { return 0; } -static int +SWIGRUNTIME(int) SWIG_Tcl_Thisown(void *ptr) { if (!swigobjectTableinit) return 0; if (Tcl_FindHashEntry(&swigobjectTable, (char *) ptr)) { @@ -652,9 +439,9 @@ SWIG_Tcl_Thisown(void *ptr) { } /* Convert a pointer value */ -static int -SWIG_Tcl_ConvertPtrFromString(Tcl_Interp *interp, const char *c, void **ptr, swig_type_info *ty, int flags) { - swig_cast_info *tc; +SWIGRUNTIME(int) +SWIG_Tcl_ConvertPtrFromString(Tcl_Interp *interp, char *c, void **ptr, swig_type_info *ty, int flags) { + swig_type_info *tc; /* Pointer values must start with leading underscore */ while (*c != '_') { *ptr = (void *) 0; @@ -691,13 +478,13 @@ SWIG_Tcl_ConvertPtrFromString(Tcl_Interp *interp, const char *c, void **ptr, swi } /* Convert a pointer value */ -static SWIGINLINE int +SWIGRUNTIME(int) SWIG_Tcl_ConvertPtr(Tcl_Interp *interp, Tcl_Obj *oc, void **ptr, swig_type_info *ty, int flags) { return SWIG_Tcl_ConvertPtrFromString(interp, Tcl_GetStringFromObj(oc,NULL), ptr, ty, flags); } /* Convert a pointer value */ -static char * +SWIGRUNTIME(char *) SWIG_Tcl_PointerTypeFromString(char *c) { char d; /* Pointer values must start with leading underscore. NULL has no type */ @@ -714,10 +501,10 @@ SWIG_Tcl_PointerTypeFromString(char *c) { } /* Convert a packed value value */ -static int +SWIGRUNTIME(int) SWIG_Tcl_ConvertPacked(Tcl_Interp *interp, Tcl_Obj *obj, void *ptr, int sz, swig_type_info *ty, int flags) { - swig_cast_info *tc; - const char *c; + swig_type_info *tc; + char *c; if (!obj) goto type_error; c = Tcl_GetStringFromObj(obj,NULL); @@ -748,7 +535,7 @@ type_error: /* Take a pointer and convert it to a string */ -static void +SWIGRUNTIME(void) SWIG_Tcl_MakePtr(char *c, void *ptr, swig_type_info *ty, int flags) { if (ptr) { *(c++) = '_'; @@ -761,7 +548,7 @@ SWIG_Tcl_MakePtr(char *c, void *ptr, swig_type_info *ty, int flags) { } /* Create a new pointer object */ -static SWIGINLINE Tcl_Obj * +SWIGRUNTIME(Tcl_Obj *) SWIG_Tcl_NewPointerObj(void *ptr, swig_type_info *type, int flags) { Tcl_Obj *robj; char result[512]; @@ -770,7 +557,7 @@ SWIG_Tcl_NewPointerObj(void *ptr, swig_type_info *type, int flags) { return robj; } -static Tcl_Obj * +SWIGRUNTIME(Tcl_Obj *) SWIG_Tcl_NewPackedObj(void *ptr, int sz, swig_type_info *type, int flags) { char result[1024]; char *r = result; @@ -786,7 +573,7 @@ static Tcl_HashTable swigconstTable; static int swigconstTableinit = 0; /* Install Constants */ -static void +SWIGRUNTIME(void) SWIG_Tcl_InstallConstants(Tcl_Interp *interp, swig_const_info constants[]) { int i; Tcl_Obj *obj; @@ -826,7 +613,7 @@ SWIG_Tcl_InstallConstants(Tcl_Interp *interp, swig_const_info constants[]) { } } -static Tcl_Obj * +SWIGRUNTIME(Tcl_Obj *) SWIG_Tcl_GetConstant(const char *key) { Tcl_HashEntry *entryPtr; if (!swigconstTableinit) return 0; @@ -834,11 +621,12 @@ SWIG_Tcl_GetConstant(const char *key) { if (entryPtr) { return (Tcl_Obj *) Tcl_GetHashValue(entryPtr); } + printf("Searching %s\n", key); return 0; } /* Get arguments */ -static int +SWIGRUNTIME(int) SWIG_Tcl_GetArgs(Tcl_Interp *interp, int objc, Tcl_Obj *CONST objv[], const char *fmt, ...) { int argno = 0, opt = 0; long tempi; @@ -935,7 +723,7 @@ SWIG_Tcl_GetArgs(Tcl_Interp *interp, int objc, Tcl_Obj *CONST objv[], const char } } -static void +SWIGRUNTIME(void) SWIG_Tcl_ObjectDelete(ClientData clientData) { swig_instance *si = (swig_instance *) clientData; if ((si) && (si->destroy) && (SWIG_Disown(si->thisvalue))) { @@ -948,7 +736,7 @@ SWIG_Tcl_ObjectDelete(ClientData clientData) { } /* Function to invoke object methods given an instance */ -static int +SWIGRUNTIME(int) SWIG_Tcl_MethodCommand(ClientData clientData, Tcl_Interp *interp, int objc, Tcl_Obj *CONST _objv[]) { char *method, *attrname; swig_instance *inst = (swig_instance *) clientData; @@ -993,11 +781,6 @@ SWIG_Tcl_MethodCommand(ClientData clientData, Tcl_Interp *interp, int objc, Tcl_ bi = cls_stack_bi[cls_stack_top]; cls = cls_stack[cls_stack_top]; if (bi != -1) { - if (!cls->bases[bi] && cls->base_names[bi]) { - /* lookup and cache the base class */ - swig_type_info *info = SWIG_TypeQueryModule(cls->module, cls->module, cls->base_names[bi]); - if (info) cls->bases[bi] = (swig_class *) info->clientdata; - } cls = cls->bases[bi]; if (cls) { cls_stack_bi[cls_stack_top]++; @@ -1107,20 +890,7 @@ SWIG_Tcl_MethodCommand(ClientData clientData, Tcl_Interp *interp, int objc, Tcl_ meth = cls->methods; while (meth && meth->name) { char *cr = (char *) Tcl_GetStringResult(interp); - int meth_len = strlen(meth->name); - char* where = strchr(cr,':'); - while(where) { - where = strstr(where, meth->name); - if(where) { - if(where[-1] == ' ' && (where[meth_len] == ' ' || where[meth_len]==0)) { - break; - } else { - where++; - } - } - } - - if (!where) + if (!strstr(strchr(cr,':'), meth->name)) Tcl_AppendElement(interp, (char *) meth->name); meth++; } @@ -1130,7 +900,7 @@ SWIG_Tcl_MethodCommand(ClientData clientData, Tcl_Interp *interp, int objc, Tcl_ } /* Function to create objects */ -static int +SWIGRUNTIME(int) SWIG_Tcl_ObjectConstructor(ClientData clientData, Tcl_Interp *interp, int objc, Tcl_Obj *CONST objv[]) { Tcl_Obj *newObj = 0; void *thisvalue = 0; @@ -1209,7 +979,7 @@ SWIG_Tcl_ObjectConstructor(ClientData clientData, Tcl_Interp *interp, int objc, /* This function takes the current result and turns it into an object command */ -static Tcl_Obj * +SWIGRUNTIME(Tcl_Obj *) SWIG_Tcl_NewInstanceObj(Tcl_Interp *interp, void *thisvalue, swig_type_info *type, int flags) { Tcl_Obj *robj = SWIG_NewPointerObj(thisvalue, type,0); /* Check to see if this pointer belongs to a class or not */ @@ -1233,6 +1003,8 @@ SWIG_Tcl_NewInstanceObj(Tcl_Interp *interp, void *thisvalue, swig_type_info *typ return robj; } +#endif + /* Structure for command table */ typedef struct { const char *name; @@ -1253,31 +1025,6 @@ typedef struct { #define SWIG_contract_assert(expr, msg) if (!(expr)) { Tcl_SetResult(interp, (char *) msg, TCL_STATIC ); goto fail; } else -static swig_module_info * -SWIG_Tcl_GetModule(Tcl_Interp *interp) { - char *data; - swig_module_info *ret = 0; - - /* first check if pointer already created */ - data = (char *) Tcl_GetVar(interp, "swig_runtime_data_type_pointer" SWIG_RUNTIME_VERSION SWIG_TYPE_TABLE_NAME, TCL_GLOBAL_ONLY); - if (data) { - SWIG_UnpackData(data, &ret, sizeof(swig_type_info **)); - } - - return ret; -} - -static void -SWIG_Tcl_SetModule(Tcl_Interp *interp, swig_module_info *module) { - char buf[512]; - char *data; - - /* create a new pointer */ - data = SWIG_PackData(buf, &module, sizeof(swig_type_info **)); - *data = 0; - Tcl_SetVar(interp, "swig_runtime_data_type_pointer" SWIG_RUNTIME_VERSION SWIG_TYPE_TABLE_NAME, buf, 0); -} - #ifdef __cplusplus } #endif @@ -1289,20 +1036,14 @@ SWIG_Tcl_SetModule(Tcl_Interp *interp, swig_module_info *module) { /* -------- TYPES TABLE (BEGIN) -------- */ -#define SWIGTYPE_p__profile_t swig_types[0] -#define SWIGTYPE_p_int swig_types[1] -#define SWIGTYPE_p_long swig_types[2] -#define SWIGTYPE_p_p__profile_t swig_types[3] -#define SWIGTYPE_p_p_char swig_types[4] -#define SWIGTYPE_p_p_p_char swig_types[5] -#define SWIGTYPE_p_p_p_void swig_types[6] -#define SWIGTYPE_p_p_void swig_types[7] -#define SWIGTYPE_ptrdiff_t swig_types[8] -#define SWIGTYPE_size_t swig_types[9] -static swig_type_info *swig_types[11]; -static swig_module_info swig_module = {swig_types, 10, 0, 0, 0, 0}; -#define SWIG_TypeQuery(name) SWIG_TypeQueryModule(&swig_module, &swig_module, name) -#define SWIG_MangledTypeQuery(name) SWIG_MangledTypeQueryModule(&swig_module, &swig_module, name) +#define SWIGTYPE_p_p_char swig_types[0] +#define SWIGTYPE_p_p_p_char swig_types[1] +#define SWIGTYPE_p_iter_t swig_types[2] +#define SWIGTYPE_iter_t swig_types[3] +#define SWIGTYPE_p_profile_t swig_types[4] +#define SWIGTYPE_profile_t swig_types[5] +#define SWIGTYPE_p_int swig_types[6] +static swig_type_info *swig_types[8]; /* -------- TYPES TABLE (END) -------- */ @@ -1318,7 +1059,7 @@ extern "C" { #ifdef MAC_TCL #pragma export on #endif -SWIGEXPORT int SWIG_init(Tcl_Interp *); +SWIGEXPORT(int) SWIG_init(Tcl_Interp *); #ifdef MAC_TCL #pragma export off #endif @@ -1372,6 +1113,7 @@ static void my_tcl_setresult(Tcl_Interp *i, const char *str, Tcl_FreeProc *f) typedef void **iter_t; /* ick */ +extern errcode_t profile_get_string(profile_t,char const *,char const *,char const *,char const *,char **); static errcode_t iter_create(profile_t p, const char **nullterm, int flags, iter_t *OUTPUT) @@ -1505,7 +1247,7 @@ _wrap_profile_init_path(ClientData clientData, Tcl_Interp *interp, int objc, Tcl SWIG_fail; } } - /*generic swigtype hack*/ Tcl_SetObjResult(interp,SWIG_NewInstanceObj((void *) *arg2, SWIGTYPE_p__profile_t,0)); + /*generic swigtype hack*/ Tcl_SetObjResult(interp,SWIG_NewInstanceObj((void *) *arg2, SWIGTYPE_profile_t,0)); return TCL_OK; fail: return TCL_ERROR; @@ -1522,7 +1264,7 @@ _wrap_profile_init(ClientData clientData, Tcl_Interp *interp, int objc, Tcl_Obj { /*generic swigtype hack*/ arg2 = &tmp2; } - if (SWIG_GetArgs(interp, objc, objv,"|o:profile_init ?nullterm? ",(void *)0) == TCL_ERROR) SWIG_fail; + if (SWIG_GetArgs(interp, objc, objv,"|o:profile_init ?nullterm? ",0) == TCL_ERROR) SWIG_fail; if (objc > 1) { { /* in char **nullterm */ @@ -1541,7 +1283,7 @@ _wrap_profile_init(ClientData clientData, Tcl_Interp *interp, int objc, Tcl_Obj SWIG_fail; } } - /*generic swigtype hack*/ Tcl_SetObjResult(interp,SWIG_NewInstanceObj((void *) *arg2, SWIGTYPE_p__profile_t,0)); + /*generic swigtype hack*/ Tcl_SetObjResult(interp,SWIG_NewInstanceObj((void *) *arg2, SWIGTYPE_profile_t,0)); { /* freearg char **nullterm */ if (arg1) { @@ -1565,8 +1307,8 @@ _wrap_profile_flush(ClientData clientData, Tcl_Interp *interp, int objc, Tcl_Obj profile_t arg1 = (profile_t) 0 ; errcode_t result; - if (SWIG_GetArgs(interp, objc, objv,"o:profile_flush profile_t ",(void *)0) == TCL_ERROR) SWIG_fail; - if ((SWIG_ConvertPtr(objv[1], (void **) &arg1, SWIGTYPE_p__profile_t,SWIG_POINTER_EXCEPTION | 0) != TCL_OK)) SWIG_fail; + if (SWIG_GetArgs(interp, objc, objv,"o:profile_flush profile_t ",0) == TCL_ERROR) SWIG_fail; + if ((SWIG_ConvertPtr(objv[1], (void **) &arg1, SWIGTYPE_profile_t,SWIG_POINTER_EXCEPTION | 0) != TCL_OK)) SWIG_fail; result = (errcode_t)profile_flush(arg1); { @@ -1587,11 +1329,11 @@ _wrap_profile_flush(ClientData clientData, Tcl_Interp *interp, int objc, Tcl_Obj static int _wrap_profile_flush_to_file(ClientData clientData, Tcl_Interp *interp, int objc, Tcl_Obj *CONST objv[]) { profile_t arg1 = (profile_t) 0 ; - char *arg2 = (char *) 0 ; + char *arg2 ; errcode_t result; - if (SWIG_GetArgs(interp, objc, objv,"os:profile_flush_to_file profile_t path ",(void *)0,&arg2) == TCL_ERROR) SWIG_fail; - if ((SWIG_ConvertPtr(objv[1], (void **) &arg1, SWIGTYPE_p__profile_t,SWIG_POINTER_EXCEPTION | 0) != TCL_OK)) SWIG_fail; + if (SWIG_GetArgs(interp, objc, objv,"os:profile_flush_to_file profile_t path ",0,&arg2) == TCL_ERROR) SWIG_fail; + if ((SWIG_ConvertPtr(objv[1], (void **) &arg1, SWIGTYPE_profile_t,SWIG_POINTER_EXCEPTION | 0) != TCL_OK)) SWIG_fail; result = (errcode_t)profile_flush_to_file(arg1,(char const *)arg2); { @@ -1613,8 +1355,8 @@ static int _wrap_profile_abandon(ClientData clientData, Tcl_Interp *interp, int objc, Tcl_Obj *CONST objv[]) { profile_t arg1 = (profile_t) 0 ; - if (SWIG_GetArgs(interp, objc, objv,"o:profile_abandon profile_t ",(void *)0) == TCL_ERROR) SWIG_fail; - if ((SWIG_ConvertPtr(objv[1], (void **) &arg1, SWIGTYPE_p__profile_t,SWIG_POINTER_EXCEPTION | 0) != TCL_OK)) SWIG_fail; + if (SWIG_GetArgs(interp, objc, objv,"o:profile_abandon profile_t ",0) == TCL_ERROR) SWIG_fail; + if ((SWIG_ConvertPtr(objv[1], (void **) &arg1, SWIGTYPE_profile_t,SWIG_POINTER_EXCEPTION | 0) != TCL_OK)) SWIG_fail; profile_abandon(arg1); @@ -1628,8 +1370,8 @@ static int _wrap_profile_release(ClientData clientData, Tcl_Interp *interp, int objc, Tcl_Obj *CONST objv[]) { profile_t arg1 = (profile_t) 0 ; - if (SWIG_GetArgs(interp, objc, objv,"o:profile_release profile_t ",(void *)0) == TCL_ERROR) SWIG_fail; - if ((SWIG_ConvertPtr(objv[1], (void **) &arg1, SWIGTYPE_p__profile_t,SWIG_POINTER_EXCEPTION | 0) != TCL_OK)) SWIG_fail; + if (SWIG_GetArgs(interp, objc, objv,"o:profile_release profile_t ",0) == TCL_ERROR) SWIG_fail; + if ((SWIG_ConvertPtr(objv[1], (void **) &arg1, SWIGTYPE_profile_t,SWIG_POINTER_EXCEPTION | 0) != TCL_OK)) SWIG_fail; profile_release(arg1); @@ -1652,8 +1394,8 @@ _wrap_profile_get_values(ClientData clientData, Tcl_Interp *interp, int objc, Tc tmp3 = NULL; arg3 = &tmp3; } - if (SWIG_GetArgs(interp, objc, objv,"oo:profile_get_values p nullterm ",(void *)0,(void *)0) == TCL_ERROR) SWIG_fail; - if ((SWIG_ConvertPtr(objv[1], (void **) &arg1, SWIGTYPE_p__profile_t,SWIG_POINTER_EXCEPTION | 0) != TCL_OK)) SWIG_fail; + if (SWIG_GetArgs(interp, objc, objv,"oo:profile_get_values p nullterm ",0,0) == TCL_ERROR) SWIG_fail; + if ((SWIG_ConvertPtr(objv[1], (void **) &arg1, SWIGTYPE_profile_t,SWIG_POINTER_EXCEPTION | 0) != TCL_OK)) SWIG_fail; { /* in char **nullterm */ int n; @@ -1705,8 +1447,8 @@ _wrap_profile_get_values(ClientData clientData, Tcl_Interp *interp, int objc, Tc static int _wrap_profile_get_string(ClientData clientData, Tcl_Interp *interp, int objc, Tcl_Obj *CONST objv[]) { profile_t arg1 = (profile_t) 0 ; - char *arg2 = (char *) 0 ; - char *arg3 = (char *) 0 ; + char *arg2 ; + char *arg3 ; char *arg4 = (char *) NULL ; char *arg5 = (char *) NULL ; char **arg6 = (char **) 0 ; @@ -1718,8 +1460,8 @@ _wrap_profile_get_string(ClientData clientData, Tcl_Interp *interp, int objc, Tc tmp6 = NULL; arg6 = &tmp6; } - if (SWIG_GetArgs(interp, objc, objv,"oss|ss:profile_get_string p name subname ?subsubname? ?defval? ",(void *)0,&arg2,&arg3,&arg4,&arg5) == TCL_ERROR) SWIG_fail; - if ((SWIG_ConvertPtr(objv[1], (void **) &arg1, SWIGTYPE_p__profile_t,SWIG_POINTER_EXCEPTION | 0) != TCL_OK)) SWIG_fail; + if (SWIG_GetArgs(interp, objc, objv,"oss|ss:profile_get_string p name subname ?subsubname? ?defval? ",0,&arg2,&arg3,&arg4,&arg5) == TCL_ERROR) SWIG_fail; + if ((SWIG_ConvertPtr(objv[1], (void **) &arg1, SWIGTYPE_profile_t,SWIG_POINTER_EXCEPTION | 0) != TCL_OK)) SWIG_fail; result = (errcode_t)profile_get_string(arg1,(char const *)arg2,(char const *)arg3,(char const *)arg4,(char const *)arg5,arg6); { @@ -1757,8 +1499,8 @@ _wrap_profile_get_string(ClientData clientData, Tcl_Interp *interp, int objc, Tc static int _wrap_profile_get_integer(ClientData clientData, Tcl_Interp *interp, int objc, Tcl_Obj *CONST objv[]) { profile_t arg1 = (profile_t) 0 ; - char *arg2 = (char *) 0 ; - char *arg3 = (char *) 0 ; + char *arg2 ; + char *arg3 ; char *arg4 = (char *) NULL ; int arg5 = (int) 0 ; int *arg6 = (int *) 0 ; @@ -1766,8 +1508,8 @@ _wrap_profile_get_integer(ClientData clientData, Tcl_Interp *interp, int objc, T int temp6 ; arg6 = &temp6; - if (SWIG_GetArgs(interp, objc, objv,"oss|si:profile_get_integer p name subname ?subsubname? ?defval? ",(void *)0,&arg2,&arg3,&arg4,&arg5) == TCL_ERROR) SWIG_fail; - if ((SWIG_ConvertPtr(objv[1], (void **) &arg1, SWIGTYPE_p__profile_t,SWIG_POINTER_EXCEPTION | 0) != TCL_OK)) SWIG_fail; + if (SWIG_GetArgs(interp, objc, objv,"oss|si:profile_get_integer p name subname ?subsubname? ?defval? ",0,&arg2,&arg3,&arg4,&arg5) == TCL_ERROR) SWIG_fail; + if ((SWIG_ConvertPtr(objv[1], (void **) &arg1, SWIGTYPE_profile_t,SWIG_POINTER_EXCEPTION | 0) != TCL_OK)) SWIG_fail; result = (errcode_t)profile_get_integer(arg1,(char const *)arg2,(char const *)arg3,(char const *)arg4,arg5,arg6); { @@ -1793,8 +1535,8 @@ _wrap_profile_get_integer(ClientData clientData, Tcl_Interp *interp, int objc, T static int _wrap_profile_get_boolean(ClientData clientData, Tcl_Interp *interp, int objc, Tcl_Obj *CONST objv[]) { profile_t arg1 = (profile_t) 0 ; - char *arg2 = (char *) 0 ; - char *arg3 = (char *) 0 ; + char *arg2 ; + char *arg3 ; char *arg4 = (char *) NULL ; int arg5 = (int) 0 ; int *arg6 = (int *) 0 ; @@ -1802,8 +1544,8 @@ _wrap_profile_get_boolean(ClientData clientData, Tcl_Interp *interp, int objc, T int temp6 ; arg6 = &temp6; - if (SWIG_GetArgs(interp, objc, objv,"oss|si:profile_get_boolean p name subname ?subsubname? ?defval? ",(void *)0,&arg2,&arg3,&arg4,&arg5) == TCL_ERROR) SWIG_fail; - if ((SWIG_ConvertPtr(objv[1], (void **) &arg1, SWIGTYPE_p__profile_t,SWIG_POINTER_EXCEPTION | 0) != TCL_OK)) SWIG_fail; + if (SWIG_GetArgs(interp, objc, objv,"oss|si:profile_get_boolean p name subname ?subsubname? ?defval? ",0,&arg2,&arg3,&arg4,&arg5) == TCL_ERROR) SWIG_fail; + if ((SWIG_ConvertPtr(objv[1], (void **) &arg1, SWIGTYPE_profile_t,SWIG_POINTER_EXCEPTION | 0) != TCL_OK)) SWIG_fail; result = (errcode_t)profile_get_boolean(arg1,(char const *)arg2,(char const *)arg3,(char const *)arg4,arg5,arg6); { @@ -1839,8 +1581,8 @@ _wrap_profile_get_relation_names(ClientData clientData, Tcl_Interp *interp, int tmp3 = NULL; arg3 = &tmp3; } - if (SWIG_GetArgs(interp, objc, objv,"oo:profile_get_relation_names p nullterm ",(void *)0,(void *)0) == TCL_ERROR) SWIG_fail; - if ((SWIG_ConvertPtr(objv[1], (void **) &arg1, SWIGTYPE_p__profile_t,SWIG_POINTER_EXCEPTION | 0) != TCL_OK)) SWIG_fail; + if (SWIG_GetArgs(interp, objc, objv,"oo:profile_get_relation_names p nullterm ",0,0) == TCL_ERROR) SWIG_fail; + if ((SWIG_ConvertPtr(objv[1], (void **) &arg1, SWIGTYPE_profile_t,SWIG_POINTER_EXCEPTION | 0) != TCL_OK)) SWIG_fail; { /* in char **nullterm */ int n; @@ -1902,8 +1644,8 @@ _wrap_profile_get_subsection_names(ClientData clientData, Tcl_Interp *interp, in tmp3 = NULL; arg3 = &tmp3; } - if (SWIG_GetArgs(interp, objc, objv,"oo:profile_get_subsection_names p nullterm ",(void *)0,(void *)0) == TCL_ERROR) SWIG_fail; - if ((SWIG_ConvertPtr(objv[1], (void **) &arg1, SWIGTYPE_p__profile_t,SWIG_POINTER_EXCEPTION | 0) != TCL_OK)) SWIG_fail; + if (SWIG_GetArgs(interp, objc, objv,"oo:profile_get_subsection_names p nullterm ",0,0) == TCL_ERROR) SWIG_fail; + if ((SWIG_ConvertPtr(objv[1], (void **) &arg1, SWIGTYPE_profile_t,SWIG_POINTER_EXCEPTION | 0) != TCL_OK)) SWIG_fail; { /* in char **nullterm */ int n; @@ -1964,8 +1706,8 @@ _wrap_profile_iterator_create(ClientData clientData, Tcl_Interp *interp, int obj { /*generic swigtype hack*/ arg4 = &tmp4; } - if (SWIG_GetArgs(interp, objc, objv,"ooi:profile_iterator_create p nullterm flags ",(void *)0,(void *)0,&arg3) == TCL_ERROR) SWIG_fail; - if ((SWIG_ConvertPtr(objv[1], (void **) &arg1, SWIGTYPE_p__profile_t,SWIG_POINTER_EXCEPTION | 0) != TCL_OK)) SWIG_fail; + if (SWIG_GetArgs(interp, objc, objv,"ooi:profile_iterator_create p nullterm flags ",0,0,&arg3) == TCL_ERROR) SWIG_fail; + if ((SWIG_ConvertPtr(objv[1], (void **) &arg1, SWIGTYPE_profile_t,SWIG_POINTER_EXCEPTION | 0) != TCL_OK)) SWIG_fail; { /* in char **nullterm */ int n; @@ -1982,7 +1724,7 @@ _wrap_profile_iterator_create(ClientData clientData, Tcl_Interp *interp, int obj SWIG_fail; } } - /*generic swigtype hack*/ Tcl_SetObjResult(interp,SWIG_NewInstanceObj((void *) *arg4, SWIGTYPE_p_p_void,0)); + /*generic swigtype hack*/ Tcl_SetObjResult(interp,SWIG_NewInstanceObj((void *) *arg4, SWIGTYPE_iter_t,0)); { /* freearg char **nullterm */ if (arg2) { @@ -2006,8 +1748,8 @@ _wrap_profile_iterator_free(ClientData clientData, Tcl_Interp *interp, int objc, iter_t arg1 = (iter_t) 0 ; errcode_t result; - if (SWIG_GetArgs(interp, objc, objv,"o:profile_iterator_free i ",(void *)0) == TCL_ERROR) SWIG_fail; - if ((SWIG_ConvertPtr(objv[1], (void **) &arg1, SWIGTYPE_p_p_void,SWIG_POINTER_EXCEPTION | 0) != TCL_OK)) SWIG_fail; + if (SWIG_GetArgs(interp, objc, objv,"o:profile_iterator_free i ",0) == TCL_ERROR) SWIG_fail; + if ((SWIG_ConvertPtr(objv[1], (void **) &arg1, SWIGTYPE_iter_t,SWIG_POINTER_EXCEPTION | 0) != TCL_OK)) SWIG_fail; result = (errcode_t)iter_free(arg1); { @@ -2044,8 +1786,8 @@ _wrap_profile_iterator(ClientData clientData, Tcl_Interp *interp, int objc, Tcl_ tmp3 = NULL; arg3 = &tmp3; } - if (SWIG_GetArgs(interp, objc, objv,"o:profile_iterator iter_t ",(void *)0) == TCL_ERROR) SWIG_fail; - if ((SWIG_ConvertPtr(objv[1], (void **) &arg1, SWIGTYPE_p_p_void,SWIG_POINTER_EXCEPTION | 0) != TCL_OK)) SWIG_fail; + if (SWIG_GetArgs(interp, objc, objv,"o:profile_iterator iter_t ",0) == TCL_ERROR) SWIG_fail; + if ((SWIG_ConvertPtr(objv[1], (void **) &arg1, SWIGTYPE_iter_t,SWIG_POINTER_EXCEPTION | 0) != TCL_OK)) SWIG_fail; result = (errcode_t)profile_iterator(arg1,arg2,arg3); { @@ -2101,12 +1843,12 @@ static int _wrap_profile_update_relation(ClientData clientData, Tcl_Interp *interp, int objc, Tcl_Obj *CONST objv[]) { profile_t arg1 = (profile_t) 0 ; char **arg2 = (char **) 0 ; - char *arg3 = (char *) 0 ; + char *arg3 ; char *arg4 = (char *) NULL ; errcode_t result; - if (SWIG_GetArgs(interp, objc, objv,"oos|s:profile_update_relation p nullterm oldval ?newval? ",(void *)0,(void *)0,&arg3,&arg4) == TCL_ERROR) SWIG_fail; - if ((SWIG_ConvertPtr(objv[1], (void **) &arg1, SWIGTYPE_p__profile_t,SWIG_POINTER_EXCEPTION | 0) != TCL_OK)) SWIG_fail; + if (SWIG_GetArgs(interp, objc, objv,"oos|s:profile_update_relation p nullterm oldval ?newval? ",0,0,&arg3,&arg4) == TCL_ERROR) SWIG_fail; + if ((SWIG_ConvertPtr(objv[1], (void **) &arg1, SWIGTYPE_profile_t,SWIG_POINTER_EXCEPTION | 0) != TCL_OK)) SWIG_fail; { /* in char **nullterm */ int n; @@ -2147,8 +1889,8 @@ _wrap_profile_clear_relation(ClientData clientData, Tcl_Interp *interp, int objc char **arg2 = (char **) 0 ; errcode_t result; - if (SWIG_GetArgs(interp, objc, objv,"oo:profile_clear_relation p nullterm ",(void *)0,(void *)0) == TCL_ERROR) SWIG_fail; - if ((SWIG_ConvertPtr(objv[1], (void **) &arg1, SWIGTYPE_p__profile_t,SWIG_POINTER_EXCEPTION | 0) != TCL_OK)) SWIG_fail; + if (SWIG_GetArgs(interp, objc, objv,"oo:profile_clear_relation p nullterm ",0,0) == TCL_ERROR) SWIG_fail; + if ((SWIG_ConvertPtr(objv[1], (void **) &arg1, SWIGTYPE_profile_t,SWIG_POINTER_EXCEPTION | 0) != TCL_OK)) SWIG_fail; { /* in char **nullterm */ int n; @@ -2190,8 +1932,8 @@ _wrap_profile_rename_section(ClientData clientData, Tcl_Interp *interp, int objc char *arg3 = (char *) NULL ; errcode_t result; - if (SWIG_GetArgs(interp, objc, objv,"oo|s:profile_rename_section p nullterm ?new_name? ",(void *)0,(void *)0,&arg3) == TCL_ERROR) SWIG_fail; - if ((SWIG_ConvertPtr(objv[1], (void **) &arg1, SWIGTYPE_p__profile_t,SWIG_POINTER_EXCEPTION | 0) != TCL_OK)) SWIG_fail; + if (SWIG_GetArgs(interp, objc, objv,"oo|s:profile_rename_section p nullterm ?new_name? ",0,0,&arg3) == TCL_ERROR) SWIG_fail; + if ((SWIG_ConvertPtr(objv[1], (void **) &arg1, SWIGTYPE_profile_t,SWIG_POINTER_EXCEPTION | 0) != TCL_OK)) SWIG_fail; { /* in char **nullterm */ int n; @@ -2233,8 +1975,8 @@ _wrap_profile_add_relation(ClientData clientData, Tcl_Interp *interp, int objc, char *arg3 = (char *) NULL ; errcode_t result; - if (SWIG_GetArgs(interp, objc, objv,"oo|s:profile_add_relation p nullterm ?new_val? ",(void *)0,(void *)0,&arg3) == TCL_ERROR) SWIG_fail; - if ((SWIG_ConvertPtr(objv[1], (void **) &arg1, SWIGTYPE_p__profile_t,SWIG_POINTER_EXCEPTION | 0) != TCL_OK)) SWIG_fail; + if (SWIG_GetArgs(interp, objc, objv,"oo|s:profile_add_relation p nullterm ?new_val? ",0,0,&arg3) == TCL_ERROR) SWIG_fail; + if ((SWIG_ConvertPtr(objv[1], (void **) &arg1, SWIGTYPE_profile_t,SWIG_POINTER_EXCEPTION | 0) != TCL_OK)) SWIG_fail; { /* in char **nullterm */ int n; @@ -2281,8 +2023,8 @@ _wrap_profile_flush_to_buffer(ClientData clientData, Tcl_Interp *interp, int obj tmp2 = NULL; arg2 = &tmp2; } - if (SWIG_GetArgs(interp, objc, objv,"o:profile_flush_to_buffer p ",(void *)0) == TCL_ERROR) SWIG_fail; - if ((SWIG_ConvertPtr(objv[1], (void **) &arg1, SWIGTYPE_p__profile_t,SWIG_POINTER_EXCEPTION | 0) != TCL_OK)) SWIG_fail; + if (SWIG_GetArgs(interp, objc, objv,"o:profile_flush_to_buffer p ",0) == TCL_ERROR) SWIG_fail; + if ((SWIG_ConvertPtr(objv[1], (void **) &arg1, SWIGTYPE_profile_t,SWIG_POINTER_EXCEPTION | 0) != TCL_OK)) SWIG_fail; result = (errcode_t)profile_flush_to_buffer(arg1,arg2); { @@ -2352,52 +2094,23 @@ static swig_const_info swig_constants[] = { /* -------- TYPE CONVERSION AND EQUIVALENCE RULES (BEGIN) -------- */ -static swig_type_info _swigt__p__profile_t = {"_p__profile_t", "struct _profile_t *|profile_t", 0, 0, 0}; -static swig_type_info _swigt__p_int = {"_p_int", "int *", 0, 0, 0}; -static swig_type_info _swigt__p_long = {"_p_long", "long *|errcode_t *", 0, 0, 0}; -static swig_type_info _swigt__p_p__profile_t = {"_p_p__profile_t", "struct _profile_t **|profile_t *", 0, 0, 0}; -static swig_type_info _swigt__p_p_char = {"_p_p_char", "char **", 0, 0, 0}; -static swig_type_info _swigt__p_p_p_char = {"_p_p_p_char", "char ***", 0, 0, 0}; -static swig_type_info _swigt__p_p_p_void = {"_p_p_p_void", "void ***|iter_t *", 0, 0, 0}; -static swig_type_info _swigt__p_p_void = {"_p_p_void", "void **|iter_t", 0, 0, 0}; -static swig_type_info _swigt__ptrdiff_t = {"_ptrdiff_t", "ptrdiff_t", 0, 0, 0}; -static swig_type_info _swigt__size_t = {"_size_t", "size_t", 0, 0, 0}; - -static swig_type_info *swig_type_initial[] = { - &_swigt__p__profile_t, - &_swigt__p_int, - &_swigt__p_long, - &_swigt__p_p__profile_t, - &_swigt__p_p_char, - &_swigt__p_p_p_char, - &_swigt__p_p_p_void, - &_swigt__p_p_void, - &_swigt__ptrdiff_t, - &_swigt__size_t, -}; - -static swig_cast_info _swigc__p__profile_t[] = { {&_swigt__p__profile_t, 0, 0, 0},{0, 0, 0, 0}}; -static swig_cast_info _swigc__p_int[] = { {&_swigt__p_int, 0, 0, 0},{0, 0, 0, 0}}; -static swig_cast_info _swigc__p_long[] = { {&_swigt__p_long, 0, 0, 0},{0, 0, 0, 0}}; -static swig_cast_info _swigc__p_p__profile_t[] = { {&_swigt__p_p__profile_t, 0, 0, 0},{0, 0, 0, 0}}; -static swig_cast_info _swigc__p_p_char[] = { {&_swigt__p_p_char, 0, 0, 0},{0, 0, 0, 0}}; -static swig_cast_info _swigc__p_p_p_char[] = { {&_swigt__p_p_p_char, 0, 0, 0},{0, 0, 0, 0}}; -static swig_cast_info _swigc__p_p_p_void[] = { {&_swigt__p_p_p_void, 0, 0, 0},{0, 0, 0, 0}}; -static swig_cast_info _swigc__p_p_void[] = { {&_swigt__p_p_void, 0, 0, 0},{0, 0, 0, 0}}; -static swig_cast_info _swigc__ptrdiff_t[] = { {&_swigt__ptrdiff_t, 0, 0, 0},{0, 0, 0, 0}}; -static swig_cast_info _swigc__size_t[] = { {&_swigt__size_t, 0, 0, 0},{0, 0, 0, 0}}; - -static swig_cast_info *swig_cast_initial[] = { - _swigc__p__profile_t, - _swigc__p_int, - _swigc__p_long, - _swigc__p_p__profile_t, - _swigc__p_p_char, - _swigc__p_p_p_char, - _swigc__p_p_p_void, - _swigc__p_p_void, - _swigc__ptrdiff_t, - _swigc__size_t, +static swig_type_info _swigt__p_p_char[] = {{"_p_p_char", 0, "char **", 0},{"_p_p_char"},{0}}; +static swig_type_info _swigt__p_p_p_char[] = {{"_p_p_p_char", 0, "char ***", 0},{"_p_p_p_char"},{0}}; +static swig_type_info _swigt__p_iter_t[] = {{"_p_iter_t", 0, "iter_t *", 0},{"_p_iter_t"},{0}}; +static swig_type_info _swigt__iter_t[] = {{"_iter_t", 0, "iter_t", 0},{"_iter_t"},{0}}; +static swig_type_info _swigt__p_profile_t[] = {{"_p_profile_t", 0, "profile_t *", 0},{"_p_profile_t"},{0}}; +static swig_type_info _swigt__profile_t[] = {{"_profile_t", 0, "profile_t", 0},{"_profile_t"},{0}}; +static swig_type_info _swigt__p_int[] = {{"_p_int", 0, "int *", 0},{"_p_int"},{0}}; + +static swig_type_info *swig_types_initial[] = { +_swigt__p_p_char, +_swigt__p_p_p_char, +_swigt__p_iter_t, +_swigt__iter_t, +_swigt__p_profile_t, +_swigt__profile_t, +_swigt__p_int, +0 }; @@ -2406,159 +2119,10 @@ static swig_cast_info *swig_cast_initial[] = { #ifdef __cplusplus } #endif -/************************************************************************* - * Type initialization: - * This problem is tough by the requirement that no dynamic - * memory is used. Also, since swig_type_info structures store pointers to - * swig_cast_info structures and swig_cast_info structures store pointers back - * to swig_type_info structures, we need some lookup code at initialization. - * The idea is that swig generates all the structures that are needed. - * The runtime then collects these partially filled structures. - * The SWIG_InitializeModule function takes these initial arrays out of - * swig_module, and does all the lookup, filling in the swig_module.types - * array with the correct data and linking the correct swig_cast_info - * structures together. - - * The generated swig_type_info structures are assigned staticly to an initial - * array. We just loop though that array, and handle each type individually. - * First we lookup if this type has been already loaded, and if so, use the - * loaded structure instead of the generated one. Then we have to fill in the - * cast linked list. The cast data is initially stored in something like a - * two-dimensional array. Each row corresponds to a type (there are the same - * number of rows as there are in the swig_type_initial array). Each entry in - * a column is one of the swig_cast_info structures for that type. - * The cast_initial array is actually an array of arrays, because each row has - * a variable number of columns. So to actually build the cast linked list, - * we find the array of casts associated with the type, and loop through it - * adding the casts to the list. The one last trick we need to do is making - * sure the type pointer in the swig_cast_info struct is correct. - - * First off, we lookup the cast->type name to see if it is already loaded. - * There are three cases to handle: - * 1) If the cast->type has already been loaded AND the type we are adding - * casting info to has not been loaded (it is in this module), THEN we - * replace the cast->type pointer with the type pointer that has already - * been loaded. - * 2) If BOTH types (the one we are adding casting info to, and the - * cast->type) are loaded, THEN the cast info has already been loaded by - * the previous module so we just ignore it. - * 3) Finally, if cast->type has not already been loaded, then we add that - * swig_cast_info to the linked list (because the cast->type) pointer will - * be correct. -**/ -#ifdef __cplusplus -extern "C" { -#endif - - SWIGRUNTIME void - SWIG_InitializeModule(void *clientdata) { - swig_type_info *type, *ret; - swig_cast_info *cast; - size_t i; - swig_module_info *module_head; - static int init_run = 0; - - clientdata = clientdata; - - if (init_run) return; - init_run = 1; - - /* Initialize the swig_module */ - swig_module.type_initial = swig_type_initial; - swig_module.cast_initial = swig_cast_initial; - - /* Try and load any already created modules */ - module_head = SWIG_GetModule(clientdata); - if (module_head) { - swig_module.next = module_head->next; - module_head->next = &swig_module; - } else { - /* This is the first module loaded */ - swig_module.next = &swig_module; - SWIG_SetModule(clientdata, &swig_module); - } - - /* Now work on filling in swig_module.types */ - for (i = 0; i < swig_module.size; ++i) { - type = 0; - - /* if there is another module already loaded */ - if (swig_module.next != &swig_module) { - type = SWIG_MangledTypeQueryModule(swig_module.next, &swig_module, swig_module.type_initial[i]->name); - } - if (type) { - /* Overwrite clientdata field */ - if (swig_module.type_initial[i]->clientdata) type->clientdata = swig_module.type_initial[i]->clientdata; - } else { - type = swig_module.type_initial[i]; - } - - /* Insert casting types */ - cast = swig_module.cast_initial[i]; - while (cast->type) { - /* Don't need to add information already in the list */ - ret = 0; - if (swig_module.next != &swig_module) { - ret = SWIG_MangledTypeQueryModule(swig_module.next, &swig_module, cast->type->name); - } - if (ret && type == swig_module.type_initial[i]) { - cast->type = ret; - ret = 0; - } - - if (!ret) { - if (type->cast) { - type->cast->prev = cast; - cast->next = type->cast; - } - type->cast = cast; - } - - cast++; - } - - /* Set entry in modules->types array equal to the type */ - swig_module.types[i] = type; - } - swig_module.types[i] = 0; - } - - /* This function will propagate the clientdata field of type to - * any new swig_type_info structures that have been added into the list - * of equivalent types. It is like calling - * SWIG_TypeClientData(type, clientdata) a second time. - */ - SWIGRUNTIME void - SWIG_PropagateClientData(void) { - size_t i; - swig_cast_info *equiv; - static int init_run = 0; - - if (init_run) return; - init_run = 1; - - for (i = 0; i < swig_module.size; i++) { - if (swig_module.types[i]->clientdata) { - equiv = swig_module.types[i]->cast; - while (equiv) { - if (!equiv->converter) { - if (equiv->type && !equiv->type->clientdata) - SWIG_TypeClientData(equiv->type, swig_module.types[i]->clientdata); - } - equiv = equiv->next; - } - } - } - } - -#ifdef __cplusplus -} -#endif - - -SWIGEXPORT int SWIG_init(Tcl_Interp *interp) { +SWIGEXPORT(int) SWIG_init(Tcl_Interp *interp) { int i; + static int _init = 0; if (interp == 0) return TCL_ERROR; #ifdef USE_TCL_STUBS if (Tcl_InitStubs(interp, (char*)"8.1", 0) == NULL) { @@ -2571,10 +2135,12 @@ SWIGEXPORT int SWIG_init(Tcl_Interp *interp) { #ifdef SWIG_namespace Tcl_Eval(interp, "namespace eval " SWIG_namespace " { }"); #endif - - SWIG_InitializeModule((void *) interp); - SWIG_PropagateClientData(); - + if (!_init) { + for (i = 0; swig_types_initial[i]; i++) { + swig_types[i] = SWIG_TypeRegister(swig_types_initial[i]); + } + _init = 1; + } for (i = 0; swig_commands[i].name; i++) { Tcl_CreateObjCommand(interp, (char *) swig_commands[i].name, (swig_wrapper_func) swig_commands[i].wrapper, swig_commands[i].clientdata, NULL); } @@ -2587,7 +2153,7 @@ SWIGEXPORT int SWIG_init(Tcl_Interp *interp) { return TCL_OK; } -SWIGEXPORT int Profile_SafeInit(Tcl_Interp *interp) { +SWIGEXPORT(int) Profile_SafeInit(Tcl_Interp *interp) { return SWIG_init(interp); } |