Merge branch 'master' into gsoc2009-matevz
parser.y still to be fixed up Conflicts: Doc/Devel/engineering.html Examples/Makefile.in Lib/allegrocl/allegrocl.swg Lib/csharp/csharp.swg Lib/csharp/enums.swg Lib/csharp/enumsimple.swg Lib/csharp/enumtypesafe.swg Lib/java/java.swg Lib/python/pydocs.swg Lib/r/rtype.swg Source/Include/swigwarn.h Source/Modules/octave.cxx Source/Modules/python.cxx Source/Modules/ruby.cxx Source/Swig/scanner.c Source/Swig/stype.c Source/Swig/swig.h configure.ac
This commit is contained in:
commit
e805d5f925
1074 changed files with 54339 additions and 20134 deletions
|
|
@ -24,6 +24,10 @@ namespace std {
|
|||
template<class K, class T> class map {
|
||||
// add typemaps here
|
||||
public:
|
||||
typedef size_t size_type;
|
||||
typedef ptrdiff_t difference_type;
|
||||
typedef K key_type;
|
||||
typedef T mapped_type;
|
||||
map();
|
||||
map(const map<K,T> &);
|
||||
|
||||
|
|
|
|||
|
|
@ -49,6 +49,7 @@ typedef struct swig_class {
|
|||
struct swig_class **bases;
|
||||
const char **base_names;
|
||||
swig_module_info *module;
|
||||
Tcl_HashTable hashtable;
|
||||
} swig_class;
|
||||
|
||||
typedef struct swig_instance {
|
||||
|
|
|
|||
|
|
@ -42,7 +42,7 @@ extern "C" {
|
|||
|
||||
SWIGINTERN void
|
||||
SWIG_Tcl_InstallConstants(Tcl_Interp *interp, swig_const_info constants[]) {
|
||||
int i;
|
||||
size_t i;
|
||||
Tcl_Obj *obj;
|
||||
|
||||
if (!swigconstTableinit) {
|
||||
|
|
@ -67,6 +67,27 @@ SWIG_Tcl_InstallConstants(Tcl_Interp *interp, swig_const_info constants[]) {
|
|||
}
|
||||
}
|
||||
|
||||
/* Create fast method lookup tables */
|
||||
|
||||
SWIGINTERN void
|
||||
SWIG_Tcl_InstallMethodLookupTables(void) {
|
||||
size_t i;
|
||||
|
||||
for (i = 0; i < swig_module.size; ++i) {
|
||||
swig_type_info *type = swig_module.type_initial[i];
|
||||
if (type->clientdata) {
|
||||
swig_class* klass = (swig_class*) type->clientdata;
|
||||
swig_method* meth;
|
||||
Tcl_InitHashTable(&(klass->hashtable), TCL_STRING_KEYS);
|
||||
for (meth = klass->methods; meth && meth->name; ++meth) {
|
||||
int newEntry;
|
||||
Tcl_HashEntry* hashentry = Tcl_CreateHashEntry(&(klass->hashtable), meth->name, &newEntry);
|
||||
Tcl_SetHashValue(hashentry, (ClientData)meth->method);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
|
@ -76,7 +97,7 @@ SWIG_Tcl_InstallConstants(Tcl_Interp *interp, swig_const_info constants[]) {
|
|||
* -----------------------------------------------------------------------------*/
|
||||
|
||||
SWIGEXPORT int SWIG_init(Tcl_Interp *interp) {
|
||||
int i;
|
||||
size_t i;
|
||||
if (interp == 0) return TCL_ERROR;
|
||||
#ifdef USE_TCL_STUBS
|
||||
/* (char*) cast is required to avoid compiler warning/error for Tcl < 8.4. */
|
||||
|
|
@ -113,6 +134,7 @@ SWIGEXPORT int SWIG_init(Tcl_Interp *interp) {
|
|||
}
|
||||
|
||||
SWIG_Tcl_InstallConstants(interp, swig_constants);
|
||||
SWIG_Tcl_InstallMethodLookupTables();
|
||||
|
||||
%}
|
||||
|
||||
|
|
|
|||
|
|
@ -71,9 +71,6 @@
|
|||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#if 0
|
||||
} /* cc-mode */
|
||||
#endif
|
||||
#endif
|
||||
|
||||
/* Object support */
|
||||
|
|
@ -280,7 +277,7 @@ SWIG_Tcl_SetModule(Tcl_Interp *interp, swig_module_info *module) {
|
|||
/* create a new pointer */
|
||||
data = SWIG_PackData(buf, &module, sizeof(swig_type_info **));
|
||||
*data = 0;
|
||||
Tcl_SetVar(interp, (char *)"swig_runtime_data_type_pointer" SWIG_RUNTIME_VERSION SWIG_TYPE_TABLE_NAME, buf, 0);
|
||||
Tcl_SetVar(interp, (char *)"swig_runtime_data_type_pointer" SWIG_RUNTIME_VERSION SWIG_TYPE_TABLE_NAME, buf, TCL_GLOBAL_ONLY);
|
||||
}
|
||||
|
||||
/* -----------------------------------------------------------------------------*
|
||||
|
|
@ -343,6 +340,7 @@ SWIG_Tcl_MethodCommand(ClientData clientData, Tcl_Interp *interp, int objc, Tcl_
|
|||
cls_stack_bi[cls_stack_top] = -1;
|
||||
cls = inst->classptr;
|
||||
while (1) {
|
||||
Tcl_HashEntry* hashentry;
|
||||
bi = cls_stack_bi[cls_stack_top];
|
||||
cls = cls_stack[cls_stack_top];
|
||||
if (bi != -1) {
|
||||
|
|
@ -367,19 +365,17 @@ SWIG_Tcl_MethodCommand(ClientData clientData, Tcl_Interp *interp, int objc, Tcl_
|
|||
}
|
||||
cls_stack_bi[cls_stack_top]++;
|
||||
|
||||
meth = cls->methods;
|
||||
/* Check for methods */
|
||||
while (meth && meth->name) {
|
||||
if (strcmp(meth->name,method) == 0) {
|
||||
hashentry = Tcl_FindHashEntry(&(cls->hashtable), method);
|
||||
if (hashentry) {
|
||||
ClientData cd = Tcl_GetHashValue(hashentry);
|
||||
swig_wrapper method_wrapper = (swig_wrapper)cd;
|
||||
oldarg = objv[1];
|
||||
objv[1] = inst->thisptr;
|
||||
Tcl_IncrRefCount(inst->thisptr);
|
||||
rcode = (*meth->method)(clientData,interp,objc,objv);
|
||||
rcode = (method_wrapper)(clientData,interp,objc,objv);
|
||||
objv[1] = oldarg;
|
||||
Tcl_DecrRefCount(inst->thisptr);
|
||||
return rcode;
|
||||
}
|
||||
meth++;
|
||||
}
|
||||
/* Check class methods for a match */
|
||||
if (strcmp(method,"cget") == 0) {
|
||||
|
|
@ -486,7 +482,7 @@ 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 */
|
||||
if ((type->clientdata) && (interp)) {
|
||||
if (thisvalue && (type->clientdata) && (interp)) {
|
||||
Tcl_CmdInfo ci;
|
||||
char *name;
|
||||
name = Tcl_GetStringFromObj(robj,NULL);
|
||||
|
|
@ -685,8 +681,5 @@ SWIG_Tcl_GetArgs(Tcl_Interp *interp, int objc, Tcl_Obj *CONST objv[], const char
|
|||
}
|
||||
|
||||
#ifdef __cplusplus
|
||||
#if 0
|
||||
{ /* cc-mode */
|
||||
#endif
|
||||
}
|
||||
#endif
|
||||
|
|
|
|||
|
|
@ -7,7 +7,7 @@
|
|||
* ------------------------------------------------------------ */
|
||||
|
||||
/*
|
||||
in Tcl we need to pass the interp value, so, we define the decl/call
|
||||
In Tcl we need to pass the interp value, so we define the decl/call
|
||||
macros as needed.
|
||||
*/
|
||||
|
||||
|
|
@ -15,13 +15,13 @@
|
|||
#define SWIG_AS_CALL_ARGS SWIG_TCL_CALL_ARGS_2
|
||||
|
||||
|
||||
/* Include fundamental fragemt definitions */
|
||||
/* Include fundamental fragment definitions */
|
||||
%include <typemaps/fragments.swg>
|
||||
|
||||
/* Look for user fragments file. */
|
||||
%include <tclfragments.swg>
|
||||
|
||||
/* Tcl fragments for primitve types */
|
||||
/* Tcl fragments for primitive types */
|
||||
%include <tclprimtypes.swg>
|
||||
|
||||
/* Tcl fragments for char* strings */
|
||||
|
|
@ -32,7 +32,7 @@
|
|||
* Unified typemap section
|
||||
* ------------------------------------------------------------ */
|
||||
|
||||
/* No director supported in Tcl */
|
||||
/* No director support in Tcl */
|
||||
#ifdef SWIG_DIRECTOR_TYPEMAPS
|
||||
#undef SWIG_DIRECTOR_TYPEMAPS
|
||||
#endif
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue