From: Sam Hartman Date: Wed, 11 Jan 2006 21:43:29 +0000 (+0000) Subject: Remove krb5_callconv from non-exported internal function X-Git-Tag: ms-bug-test-20060525~24 X-Git-Url: http://git.tremily.us/?a=commitdiff_plain;h=95a1115f3d5d582411712d07b77a7df95b912f8a;p=krb5.git Remove krb5_callconv from non-exported internal function git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@17585 dc483132-0cff-0310-8789-dd5450dbe970 --- diff --git a/src/lib/crypto/ChangeLog b/src/lib/crypto/ChangeLog index 590d94e10..7365bc293 100644 --- a/src/lib/crypto/ChangeLog +++ b/src/lib/crypto/ChangeLog @@ -1,3 +1,7 @@ +2006-01-11 Sam Hartman + + * keyblocks.c (krb5int_c_free_keyblock): Remove krb5_callconv modifier + 2005-11-28 Tom Yu * t_cts.c, vectors.c: Don't include krb5.h. diff --git a/src/lib/crypto/keyblocks.c b/src/lib/crypto/keyblocks.c index da6efe27c..626443c83 100644 --- a/src/lib/crypto/keyblocks.c +++ b/src/lib/crypto/keyblocks.c @@ -61,7 +61,7 @@ krb5_error_code krb5int_c_init_keyblock } -void KRB5_CALLCONV +void krb5int_c_free_keyblock(krb5_context context, register krb5_keyblock *val) { krb5int_c_free_keyblock_contents(context, val); diff --git a/src/util/profile/profile_tcl.c b/src/util/profile/profile_tcl.c index 31a82f1b4..71be53135 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.21 + * Version 1.3.27 * * 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,71 +8,113 @@ * interface file instead. * ----------------------------------------------------------------------------- */ -/*************************************************************** -*- c -*- - * Tcl/precommon.swg +/*********************************************************************** * - * Rename all exported symbols from common.swg, to avoid symbol - * clashes if multiple interpreters are included + * This section contains generic SWIG labels for method/variable + * declarations/attributes, and other compiler dependent labels. * ************************************************************************/ -#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 +/* 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 /*********************************************************************** - * common.swg + * swigrun.swg * - * This file contains generic SWIG runtime support for pointer - * type checking as well as a few commonly used macros to control - * external linkage. + * This file contains generic CAPI SWIG runtime support for pointer + * type checking. * - * 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. ************************************************************************/ -#include +/* 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" -#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 +/* 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) #else -# define SWIGEXPORT(a) a -# define SWIGIMPORT(a) a +# define SWIG_TYPE_TABLE_NAME #endif -#ifdef SWIG_GLOBAL -# define SWIGRUNTIME(a) SWIGEXPORT(a) -#else -# define SWIGRUNTIME(a) static a +/* + 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 #endif +#include + #ifdef __cplusplus extern "C" { #endif @@ -80,106 +122,141 @@ 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; - swig_converter_func converter; - const char *str; - void *clientdata; - swig_dycast_func dcast; - struct swig_type_info *next; - struct swig_type_info *prev; + 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 */ } swig_type_info; -#ifdef SWIG_NOINCLUDE - -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); - -#else +/* 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" == "Class", 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); +} -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; +/* + Check type equivalence in a name list like ||... + 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; } - 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++; + return equiv; +} + +/* + Check type equivalence in a name list like ||... + 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; } - if (next) next->prev = head; - head->next = next; - return ret; + return equiv; } -/* 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; + +/* 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 + +/* + 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); } -/* 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); +/* 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); } -/* Dynamic pointer casting. Down an inheritance hierarchy */ -SWIGRUNTIME(swig_type_info *) +/* + 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); +} + +/* + 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; @@ -190,95 +267,246 @@ SWIG_TypeDynamicCast(swig_type_info *ty, void **ptr) { return lastty; } -/* Return the name associated with this type */ -SWIGRUNTIME(const char *) +/* + Return the name associated with this type +*/ +SWIGRUNTIMEINLINE const char * SWIG_TypeName(const swig_type_info *ty) { return ty->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; +/* + 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; } - return 0; + else + return type->name; } -/* 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_type_info *tc, *equiv; - if (ti->clientdata == clientdata) return; + swig_cast_info *cast = ti->cast; + /* if (ti->clientdata == clientdata) return; */ ti->clientdata = 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; + + while (cast) { + if (!cast->converter) { + swig_type_info *tc = cast->type; + if (!tc->clientdata) { + SWIG_TypeClientData(tc, clientdata); } + } + 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); } - equiv = equiv->next; + 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); } + + /* neither found a match */ + return 0; } -/* 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; + +/* + 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; *(c++) = hex[(uu & 0xf0) >> 4]; *(c++) = hex[uu & 0xf]; } return c; } -/* 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++); +/* + 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; 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; } -#endif +/* + 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); +} #ifdef __cplusplus } #endif /* - * $Header: /cvsroot/SWIG/Lib/tcl/swigtcl8.swg,v 1.19 2003/12/09 12:44:49 beazley Exp $ + * $Header: /cvsroot/swig/SWIG/Lib/tcl/swigtcl8.swg,v 1.28 2005/06/17 23:15:51 marcelomatus Exp $ * * swigtcl8.swg */ #include +#include #include #include #include @@ -337,6 +565,8 @@ 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 { @@ -378,34 +608,17 @@ typedef struct swig_instance { #define SWIG_MethodCommand SWIG_Tcl_MethodCommand #define SWIG_ObjectDelete SWIG_Tcl_ObjectDelete -#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 +/* 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 * /* Object support */ static Tcl_HashTable swigobjectTable; static int swigobjectTableinit = 0; /* Acquire ownership of a pointer */ -SWIGRUNTIME(void) +static void SWIG_Tcl_Acquire(void *ptr) { Tcl_HashEntry *entryPtr; int newobj; @@ -417,7 +630,7 @@ SWIG_Tcl_Acquire(void *ptr) { } /* Disown a pointer. Returns 1 if we owned it to begin with */ -SWIGRUNTIME(int) +static int SWIG_Tcl_Disown(void *ptr) { Tcl_HashEntry *entryPtr; if (!swigobjectTableinit) return 0; @@ -429,7 +642,7 @@ SWIG_Tcl_Disown(void *ptr) { return 0; } -SWIGRUNTIME(int) +static int SWIG_Tcl_Thisown(void *ptr) { if (!swigobjectTableinit) return 0; if (Tcl_FindHashEntry(&swigobjectTable, (char *) ptr)) { @@ -439,9 +652,9 @@ SWIG_Tcl_Thisown(void *ptr) { } /* Convert a pointer value */ -SWIGRUNTIME(int) -SWIG_Tcl_ConvertPtrFromString(Tcl_Interp *interp, char *c, void **ptr, swig_type_info *ty, int flags) { - swig_type_info *tc; +static int +SWIG_Tcl_ConvertPtrFromString(Tcl_Interp *interp, const char *c, void **ptr, swig_type_info *ty, int flags) { + swig_cast_info *tc; /* Pointer values must start with leading underscore */ while (*c != '_') { *ptr = (void *) 0; @@ -478,13 +691,13 @@ SWIG_Tcl_ConvertPtrFromString(Tcl_Interp *interp, char *c, void **ptr, swig_type } /* Convert a pointer value */ -SWIGRUNTIME(int) +static SWIGINLINE 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 */ -SWIGRUNTIME(char *) +static char * SWIG_Tcl_PointerTypeFromString(char *c) { char d; /* Pointer values must start with leading underscore. NULL has no type */ @@ -501,10 +714,10 @@ SWIG_Tcl_PointerTypeFromString(char *c) { } /* Convert a packed value value */ -SWIGRUNTIME(int) +static int SWIG_Tcl_ConvertPacked(Tcl_Interp *interp, Tcl_Obj *obj, void *ptr, int sz, swig_type_info *ty, int flags) { - swig_type_info *tc; - char *c; + swig_cast_info *tc; + const char *c; if (!obj) goto type_error; c = Tcl_GetStringFromObj(obj,NULL); @@ -535,7 +748,7 @@ type_error: /* Take a pointer and convert it to a string */ -SWIGRUNTIME(void) +static void SWIG_Tcl_MakePtr(char *c, void *ptr, swig_type_info *ty, int flags) { if (ptr) { *(c++) = '_'; @@ -548,7 +761,7 @@ SWIG_Tcl_MakePtr(char *c, void *ptr, swig_type_info *ty, int flags) { } /* Create a new pointer object */ -SWIGRUNTIME(Tcl_Obj *) +static SWIGINLINE Tcl_Obj * SWIG_Tcl_NewPointerObj(void *ptr, swig_type_info *type, int flags) { Tcl_Obj *robj; char result[512]; @@ -557,7 +770,7 @@ SWIG_Tcl_NewPointerObj(void *ptr, swig_type_info *type, int flags) { return robj; } -SWIGRUNTIME(Tcl_Obj *) +static Tcl_Obj * SWIG_Tcl_NewPackedObj(void *ptr, int sz, swig_type_info *type, int flags) { char result[1024]; char *r = result; @@ -573,7 +786,7 @@ static Tcl_HashTable swigconstTable; static int swigconstTableinit = 0; /* Install Constants */ -SWIGRUNTIME(void) +static void SWIG_Tcl_InstallConstants(Tcl_Interp *interp, swig_const_info constants[]) { int i; Tcl_Obj *obj; @@ -613,7 +826,7 @@ SWIG_Tcl_InstallConstants(Tcl_Interp *interp, swig_const_info constants[]) { } } -SWIGRUNTIME(Tcl_Obj *) +static Tcl_Obj * SWIG_Tcl_GetConstant(const char *key) { Tcl_HashEntry *entryPtr; if (!swigconstTableinit) return 0; @@ -621,12 +834,11 @@ SWIG_Tcl_GetConstant(const char *key) { if (entryPtr) { return (Tcl_Obj *) Tcl_GetHashValue(entryPtr); } - printf("Searching %s\n", key); return 0; } /* Get arguments */ -SWIGRUNTIME(int) +static int SWIG_Tcl_GetArgs(Tcl_Interp *interp, int objc, Tcl_Obj *CONST objv[], const char *fmt, ...) { int argno = 0, opt = 0; long tempi; @@ -723,7 +935,7 @@ SWIG_Tcl_GetArgs(Tcl_Interp *interp, int objc, Tcl_Obj *CONST objv[], const char } } -SWIGRUNTIME(void) +static void SWIG_Tcl_ObjectDelete(ClientData clientData) { swig_instance *si = (swig_instance *) clientData; if ((si) && (si->destroy) && (SWIG_Disown(si->thisvalue))) { @@ -736,7 +948,7 @@ SWIG_Tcl_ObjectDelete(ClientData clientData) { } /* Function to invoke object methods given an instance */ -SWIGRUNTIME(int) +static int SWIG_Tcl_MethodCommand(ClientData clientData, Tcl_Interp *interp, int objc, Tcl_Obj *CONST _objv[]) { char *method, *attrname; swig_instance *inst = (swig_instance *) clientData; @@ -781,6 +993,11 @@ 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]++; @@ -890,7 +1107,20 @@ SWIG_Tcl_MethodCommand(ClientData clientData, Tcl_Interp *interp, int objc, Tcl_ meth = cls->methods; while (meth && meth->name) { char *cr = (char *) Tcl_GetStringResult(interp); - if (!strstr(strchr(cr,':'), meth->name)) + 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) Tcl_AppendElement(interp, (char *) meth->name); meth++; } @@ -900,7 +1130,7 @@ SWIG_Tcl_MethodCommand(ClientData clientData, Tcl_Interp *interp, int objc, Tcl_ } /* Function to create objects */ -SWIGRUNTIME(int) +static int SWIG_Tcl_ObjectConstructor(ClientData clientData, Tcl_Interp *interp, int objc, Tcl_Obj *CONST objv[]) { Tcl_Obj *newObj = 0; void *thisvalue = 0; @@ -979,7 +1209,7 @@ SWIG_Tcl_ObjectConstructor(ClientData clientData, Tcl_Interp *interp, int objc, /* This function takes the current result and turns it into an object command */ -SWIGRUNTIME(Tcl_Obj *) +static 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 */ @@ -1003,8 +1233,6 @@ SWIG_Tcl_NewInstanceObj(Tcl_Interp *interp, void *thisvalue, swig_type_info *typ return robj; } -#endif - /* Structure for command table */ typedef struct { const char *name; @@ -1025,6 +1253,31 @@ 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 @@ -1036,14 +1289,20 @@ typedef struct { /* -------- TYPES TABLE (BEGIN) -------- */ -#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]; +#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) /* -------- TYPES TABLE (END) -------- */ @@ -1059,7 +1318,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 @@ -1113,7 +1372,6 @@ 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) @@ -1247,7 +1505,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_profile_t,0)); + /*generic swigtype hack*/ Tcl_SetObjResult(interp,SWIG_NewInstanceObj((void *) *arg2, SWIGTYPE_p__profile_t,0)); return TCL_OK; fail: return TCL_ERROR; @@ -1264,7 +1522,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? ",0) == TCL_ERROR) SWIG_fail; + if (SWIG_GetArgs(interp, objc, objv,"|o:profile_init ?nullterm? ",(void *)0) == TCL_ERROR) SWIG_fail; if (objc > 1) { { /* in char **nullterm */ @@ -1283,7 +1541,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_profile_t,0)); + /*generic swigtype hack*/ Tcl_SetObjResult(interp,SWIG_NewInstanceObj((void *) *arg2, SWIGTYPE_p__profile_t,0)); { /* freearg char **nullterm */ if (arg1) { @@ -1307,8 +1565,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 ",0) == TCL_ERROR) SWIG_fail; - if ((SWIG_ConvertPtr(objv[1], (void **) &arg1, SWIGTYPE_profile_t,SWIG_POINTER_EXCEPTION | 0) != TCL_OK)) SWIG_fail; + 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; result = (errcode_t)profile_flush(arg1); { @@ -1329,11 +1587,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 *arg2 = (char *) 0 ; errcode_t result; - 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; + 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; result = (errcode_t)profile_flush_to_file(arg1,(char const *)arg2); { @@ -1355,8 +1613,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 ",0) == TCL_ERROR) SWIG_fail; - if ((SWIG_ConvertPtr(objv[1], (void **) &arg1, SWIGTYPE_profile_t,SWIG_POINTER_EXCEPTION | 0) != TCL_OK)) SWIG_fail; + 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; profile_abandon(arg1); @@ -1370,8 +1628,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 ",0) == TCL_ERROR) SWIG_fail; - if ((SWIG_ConvertPtr(objv[1], (void **) &arg1, SWIGTYPE_profile_t,SWIG_POINTER_EXCEPTION | 0) != TCL_OK)) SWIG_fail; + 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; profile_release(arg1); @@ -1394,8 +1652,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 ",0,0) == TCL_ERROR) SWIG_fail; - if ((SWIG_ConvertPtr(objv[1], (void **) &arg1, SWIGTYPE_profile_t,SWIG_POINTER_EXCEPTION | 0) != TCL_OK)) SWIG_fail; + 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; { /* in char **nullterm */ int n; @@ -1447,8 +1705,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 *arg3 ; + char *arg2 = (char *) 0 ; + char *arg3 = (char *) 0 ; char *arg4 = (char *) NULL ; char *arg5 = (char *) NULL ; char **arg6 = (char **) 0 ; @@ -1460,8 +1718,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? ",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; + 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; result = (errcode_t)profile_get_string(arg1,(char const *)arg2,(char const *)arg3,(char const *)arg4,(char const *)arg5,arg6); { @@ -1499,8 +1757,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 *arg3 ; + char *arg2 = (char *) 0 ; + char *arg3 = (char *) 0 ; char *arg4 = (char *) NULL ; int arg5 = (int) 0 ; int *arg6 = (int *) 0 ; @@ -1508,8 +1766,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? ",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; + 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; result = (errcode_t)profile_get_integer(arg1,(char const *)arg2,(char const *)arg3,(char const *)arg4,arg5,arg6); { @@ -1535,8 +1793,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 *arg3 ; + char *arg2 = (char *) 0 ; + char *arg3 = (char *) 0 ; char *arg4 = (char *) NULL ; int arg5 = (int) 0 ; int *arg6 = (int *) 0 ; @@ -1544,8 +1802,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? ",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; + 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; result = (errcode_t)profile_get_boolean(arg1,(char const *)arg2,(char const *)arg3,(char const *)arg4,arg5,arg6); { @@ -1581,8 +1839,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 ",0,0) == TCL_ERROR) SWIG_fail; - if ((SWIG_ConvertPtr(objv[1], (void **) &arg1, SWIGTYPE_profile_t,SWIG_POINTER_EXCEPTION | 0) != TCL_OK)) SWIG_fail; + 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; { /* in char **nullterm */ int n; @@ -1644,8 +1902,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 ",0,0) == TCL_ERROR) SWIG_fail; - if ((SWIG_ConvertPtr(objv[1], (void **) &arg1, SWIGTYPE_profile_t,SWIG_POINTER_EXCEPTION | 0) != TCL_OK)) SWIG_fail; + 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; { /* in char **nullterm */ int n; @@ -1706,8 +1964,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 ",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; + 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; { /* in char **nullterm */ int n; @@ -1724,7 +1982,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_iter_t,0)); + /*generic swigtype hack*/ Tcl_SetObjResult(interp,SWIG_NewInstanceObj((void *) *arg4, SWIGTYPE_p_p_void,0)); { /* freearg char **nullterm */ if (arg2) { @@ -1748,8 +2006,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 ",0) == TCL_ERROR) SWIG_fail; - if ((SWIG_ConvertPtr(objv[1], (void **) &arg1, SWIGTYPE_iter_t,SWIG_POINTER_EXCEPTION | 0) != TCL_OK)) SWIG_fail; + 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; result = (errcode_t)iter_free(arg1); { @@ -1786,8 +2044,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 ",0) == TCL_ERROR) SWIG_fail; - if ((SWIG_ConvertPtr(objv[1], (void **) &arg1, SWIGTYPE_iter_t,SWIG_POINTER_EXCEPTION | 0) != TCL_OK)) SWIG_fail; + 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; result = (errcode_t)profile_iterator(arg1,arg2,arg3); { @@ -1843,12 +2101,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 *arg3 = (char *) 0 ; char *arg4 = (char *) NULL ; errcode_t result; - 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; + 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; { /* in char **nullterm */ int n; @@ -1889,8 +2147,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 ",0,0) == TCL_ERROR) SWIG_fail; - if ((SWIG_ConvertPtr(objv[1], (void **) &arg1, SWIGTYPE_profile_t,SWIG_POINTER_EXCEPTION | 0) != TCL_OK)) SWIG_fail; + 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; { /* in char **nullterm */ int n; @@ -1932,8 +2190,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? ",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; + 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; { /* in char **nullterm */ int n; @@ -1975,8 +2233,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? ",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; + 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; { /* in char **nullterm */ int n; @@ -2023,8 +2281,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 ",0) == TCL_ERROR) SWIG_fail; - if ((SWIG_ConvertPtr(objv[1], (void **) &arg1, SWIGTYPE_profile_t,SWIG_POINTER_EXCEPTION | 0) != TCL_OK)) SWIG_fail; + 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; result = (errcode_t)profile_flush_to_buffer(arg1,arg2); { @@ -2094,23 +2352,52 @@ static swig_const_info swig_constants[] = { /* -------- TYPE CONVERSION AND EQUIVALENCE RULES (BEGIN) -------- */ -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 +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, }; @@ -2119,10 +2406,159 @@ _swigt__p_int, #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. +**/ -SWIGEXPORT(int) SWIG_init(Tcl_Interp *interp) { +#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) { 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) { @@ -2135,12 +2571,10 @@ SWIGEXPORT(int) SWIG_init(Tcl_Interp *interp) { #ifdef SWIG_namespace Tcl_Eval(interp, "namespace eval " SWIG_namespace " { }"); #endif - if (!_init) { - for (i = 0; swig_types_initial[i]; i++) { - swig_types[i] = SWIG_TypeRegister(swig_types_initial[i]); - } - _init = 1; - } + + SWIG_InitializeModule((void *) interp); + SWIG_PropagateClientData(); + 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); } @@ -2153,7 +2587,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); }