Index: generic/nsf.c =================================================================== diff -u -r7a7a3fd2c6a87751e29436786910fd5b9c550d1c -r2ce5a2cab4731930a5b26455c56806fc201de23c --- generic/nsf.c (.../nsf.c) (revision 7a7a3fd2c6a87751e29436786910fd5b9c550d1c) +++ generic/nsf.c (.../nsf.c) (revision 2ce5a2cab4731930a5b26455c56806fc201de23c) @@ -7998,13 +7998,13 @@ static int ProcDispatchFinalize(ClientData data[], Tcl_Interp *interp, int result) { ParseContext *pcPtr = data[1]; - long int startUsec = (long int)data[2]; - long int startSec = (long int)data[3]; /*CONST char *methodName = data[0]; fprintf(stderr, "ProcDispatchFinalize of method %s\n", methodName);*/ # if defined(NSF_PROFILE) + long int startUsec = (long int)data[2]; + long int startSec = (long int)data[3]; char *methodName = data[0]; NsfRuntimeState *rst = RUNTIME_STATE(interp); if (rst->doProfile) { Index: generic/nsfDecls.h =================================================================== diff -u -r7a7a3fd2c6a87751e29436786910fd5b9c550d1c -r2ce5a2cab4731930a5b26455c56806fc201de23c --- generic/nsfDecls.h (.../nsfDecls.h) (revision 7a7a3fd2c6a87751e29436786910fd5b9c550d1c) +++ generic/nsfDecls.h (.../nsfDecls.h) (revision 2ce5a2cab4731930a5b26455c56806fc201de23c) @@ -25,91 +25,163 @@ * Exported function declarations: */ +#ifndef Nsf_Init_TCL_DECLARED +#define Nsf_Init_TCL_DECLARED /* 0 */ EXTERN int Nsf_Init(Tcl_Interp *interp); +#endif /* Slot 1 is reserved */ +#ifndef NsfIsClass_TCL_DECLARED +#define NsfIsClass_TCL_DECLARED /* 2 */ EXTERN struct Nsf_Class * NsfIsClass(Tcl_Interp *interp, ClientData cd); +#endif +#ifndef NsfGetObject_TCL_DECLARED +#define NsfGetObject_TCL_DECLARED /* 3 */ EXTERN struct Nsf_Object * NsfGetObject(Tcl_Interp *interp, CONST char *name); +#endif +#ifndef NsfGetClass_TCL_DECLARED +#define NsfGetClass_TCL_DECLARED /* 4 */ EXTERN struct Nsf_Class * NsfGetClass(Tcl_Interp *interp, CONST char *name); +#endif +#ifndef NsfDeleteObject_TCL_DECLARED +#define NsfDeleteObject_TCL_DECLARED /* 5 */ EXTERN int NsfDeleteObject(Tcl_Interp *interp, struct Nsf_Object *obj); +#endif +#ifndef NsfRemoveObjectMethod_TCL_DECLARED +#define NsfRemoveObjectMethod_TCL_DECLARED /* 6 */ EXTERN int NsfRemoveObjectMethod(Tcl_Interp *interp, struct Nsf_Object *obj, CONST char *nm); +#endif +#ifndef NsfRemoveClassMethod_TCL_DECLARED +#define NsfRemoveClassMethod_TCL_DECLARED /* 7 */ EXTERN int NsfRemoveClassMethod(Tcl_Interp *interp, struct Nsf_Class *cl, CONST char *nm); +#endif +#ifndef Nsf_ObjSetVar2_TCL_DECLARED +#define Nsf_ObjSetVar2_TCL_DECLARED /* 8 */ EXTERN Tcl_Obj * Nsf_ObjSetVar2(struct Nsf_Object *obj, Tcl_Interp *interp, Tcl_Obj *name1, Tcl_Obj *name2, Tcl_Obj *value, int flgs); +#endif +#ifndef Nsf_ObjGetVar2_TCL_DECLARED +#define Nsf_ObjGetVar2_TCL_DECLARED /* 9 */ EXTERN Tcl_Obj * Nsf_ObjGetVar2(struct Nsf_Object *obj, Tcl_Interp *interp, Tcl_Obj *name1, Tcl_Obj *name2, int flgs); +#endif +#ifndef Nsf_UnsetVar2_TCL_DECLARED +#define Nsf_UnsetVar2_TCL_DECLARED /* 10 */ EXTERN int Nsf_UnsetVar2(struct Nsf_Object *obj, Tcl_Interp *interp, CONST char *name1, CONST char *name2, int flgs); +#endif +#ifndef NsfDStringPrintf_TCL_DECLARED +#define NsfDStringPrintf_TCL_DECLARED /* 11 */ EXTERN void NsfDStringPrintf(Tcl_DString *dsPtr, CONST char *fmt, va_list apSrc); +#endif +#ifndef NsfPrintError_TCL_DECLARED +#define NsfPrintError_TCL_DECLARED /* 12 */ EXTERN int NsfPrintError(Tcl_Interp *interp, CONST char *fmt, ...); +#endif +#ifndef NsfErrInProc_TCL_DECLARED +#define NsfErrInProc_TCL_DECLARED /* 13 */ EXTERN int NsfErrInProc(Tcl_Interp *interp, Tcl_Obj *objName, Tcl_Obj *clName, CONST char *procName); +#endif +#ifndef NsfObjErrType_TCL_DECLARED +#define NsfObjErrType_TCL_DECLARED /* 14 */ EXTERN int NsfObjErrType(Tcl_Interp *interp, CONST char *context, Tcl_Obj *value, CONST char *type, Nsf_Param CONST *pPtr); +#endif +#ifndef NsfStackDump_TCL_DECLARED +#define NsfStackDump_TCL_DECLARED /* 15 */ EXTERN void NsfStackDump(Tcl_Interp *interp); +#endif +#ifndef NsfSetObjClientData_TCL_DECLARED +#define NsfSetObjClientData_TCL_DECLARED /* 16 */ EXTERN void NsfSetObjClientData(Nsf_Object *obj, ClientData data); +#endif +#ifndef NsfGetObjClientData_TCL_DECLARED +#define NsfGetObjClientData_TCL_DECLARED /* 17 */ EXTERN ClientData NsfGetObjClientData(Nsf_Object *obj); +#endif +#ifndef NsfSetClassClientData_TCL_DECLARED +#define NsfSetClassClientData_TCL_DECLARED /* 18 */ EXTERN void NsfSetClassClientData(Nsf_Class *cl, ClientData data); +#endif +#ifndef NsfGetClassClientData_TCL_DECLARED +#define NsfGetClassClientData_TCL_DECLARED /* 19 */ EXTERN ClientData NsfGetClassClientData(Nsf_Class *cl); +#endif +#ifndef NsfRequireObjNamespace_TCL_DECLARED +#define NsfRequireObjNamespace_TCL_DECLARED /* 20 */ EXTERN void NsfRequireObjNamespace(Tcl_Interp *interp, Nsf_Object *obj); +#endif +#ifndef NsfCallMethodWithArgs_TCL_DECLARED +#define NsfCallMethodWithArgs_TCL_DECLARED /* 21 */ EXTERN int NsfCallMethodWithArgs(ClientData cd, Tcl_Interp *interp, Tcl_Obj *method, Tcl_Obj *arg, int objc, Tcl_Obj *CONST objv[], int flags); +#endif +#ifndef NsfAddObjectMethod_TCL_DECLARED +#define NsfAddObjectMethod_TCL_DECLARED /* 22 */ EXTERN int NsfAddObjectMethod(Tcl_Interp *interp, struct Nsf_Object *obj, CONST char *nm, Tcl_ObjCmdProc *proc, ClientData cd, Tcl_CmdDeleteProc *dp, int flags); +#endif +#ifndef NsfAddClassMethod_TCL_DECLARED +#define NsfAddClassMethod_TCL_DECLARED /* 23 */ EXTERN int NsfAddClassMethod(Tcl_Interp *interp, struct Nsf_Class *cl, CONST char *nm, Tcl_ObjCmdProc *proc, ClientData cd, Tcl_CmdDeleteProc *dp, int flags); +#endif +#ifndef NsfCreate_TCL_DECLARED +#define NsfCreate_TCL_DECLARED /* 24 */ EXTERN int NsfCreate(Tcl_Interp *in, Nsf_Class *class, Tcl_Obj *name, int objc, Tcl_Obj *CONST objv[]); +#endif typedef struct NsfStubHooks { - const struct NsfIntStubs *nsfIntStubs; + struct NsfIntStubs *nsfIntStubs; } NsfStubHooks; typedef struct NsfStubs { int magic; - const struct NsfStubHooks *hooks; + struct NsfStubHooks *hooks; int (*nsf_Init) (Tcl_Interp *interp); /* 0 */ - void (*reserved1)(void); + VOID *reserved1; struct Nsf_Class * (*nsfIsClass) (Tcl_Interp *interp, ClientData cd); /* 2 */ struct Nsf_Object * (*nsfGetObject) (Tcl_Interp *interp, CONST char *name); /* 3 */ struct Nsf_Class * (*nsfGetClass) (Tcl_Interp *interp, CONST char *name); /* 4 */ @@ -138,68 +210,116 @@ #ifdef __cplusplus extern "C" { #endif -extern const NsfStubs *nsfStubsPtr; +extern NsfStubs *nsfStubsPtr; #ifdef __cplusplus } #endif -#if defined(USE_NSF_STUBS) +#if defined(USE_NSF_STUBS) && !defined(USE_NSF_STUB_PROCS) /* * Inline function declarations: */ +#ifndef Nsf_Init #define Nsf_Init \ (nsfStubsPtr->nsf_Init) /* 0 */ +#endif /* Slot 1 is reserved */ +#ifndef NsfIsClass #define NsfIsClass \ (nsfStubsPtr->nsfIsClass) /* 2 */ +#endif +#ifndef NsfGetObject #define NsfGetObject \ (nsfStubsPtr->nsfGetObject) /* 3 */ +#endif +#ifndef NsfGetClass #define NsfGetClass \ (nsfStubsPtr->nsfGetClass) /* 4 */ +#endif +#ifndef NsfDeleteObject #define NsfDeleteObject \ (nsfStubsPtr->nsfDeleteObject) /* 5 */ +#endif +#ifndef NsfRemoveObjectMethod #define NsfRemoveObjectMethod \ (nsfStubsPtr->nsfRemoveObjectMethod) /* 6 */ +#endif +#ifndef NsfRemoveClassMethod #define NsfRemoveClassMethod \ (nsfStubsPtr->nsfRemoveClassMethod) /* 7 */ +#endif +#ifndef Nsf_ObjSetVar2 #define Nsf_ObjSetVar2 \ (nsfStubsPtr->nsf_ObjSetVar2) /* 8 */ +#endif +#ifndef Nsf_ObjGetVar2 #define Nsf_ObjGetVar2 \ (nsfStubsPtr->nsf_ObjGetVar2) /* 9 */ +#endif +#ifndef Nsf_UnsetVar2 #define Nsf_UnsetVar2 \ (nsfStubsPtr->nsf_UnsetVar2) /* 10 */ +#endif +#ifndef NsfDStringPrintf #define NsfDStringPrintf \ (nsfStubsPtr->nsfDStringPrintf) /* 11 */ +#endif +#ifndef NsfPrintError #define NsfPrintError \ (nsfStubsPtr->nsfPrintError) /* 12 */ +#endif +#ifndef NsfErrInProc #define NsfErrInProc \ (nsfStubsPtr->nsfErrInProc) /* 13 */ +#endif +#ifndef NsfObjErrType #define NsfObjErrType \ (nsfStubsPtr->nsfObjErrType) /* 14 */ +#endif +#ifndef NsfStackDump #define NsfStackDump \ (nsfStubsPtr->nsfStackDump) /* 15 */ +#endif +#ifndef NsfSetObjClientData #define NsfSetObjClientData \ (nsfStubsPtr->nsfSetObjClientData) /* 16 */ +#endif +#ifndef NsfGetObjClientData #define NsfGetObjClientData \ (nsfStubsPtr->nsfGetObjClientData) /* 17 */ +#endif +#ifndef NsfSetClassClientData #define NsfSetClassClientData \ (nsfStubsPtr->nsfSetClassClientData) /* 18 */ +#endif +#ifndef NsfGetClassClientData #define NsfGetClassClientData \ (nsfStubsPtr->nsfGetClassClientData) /* 19 */ +#endif +#ifndef NsfRequireObjNamespace #define NsfRequireObjNamespace \ (nsfStubsPtr->nsfRequireObjNamespace) /* 20 */ +#endif +#ifndef NsfCallMethodWithArgs #define NsfCallMethodWithArgs \ (nsfStubsPtr->nsfCallMethodWithArgs) /* 21 */ +#endif +#ifndef NsfAddObjectMethod #define NsfAddObjectMethod \ (nsfStubsPtr->nsfAddObjectMethod) /* 22 */ +#endif +#ifndef NsfAddClassMethod #define NsfAddClassMethod \ (nsfStubsPtr->nsfAddClassMethod) /* 23 */ +#endif +#ifndef NsfCreate #define NsfCreate \ (nsfStubsPtr->nsfCreate) /* 24 */ +#endif -#endif /* defined(USE_NSF_STUBS) */ +#endif /* defined(USE_NSF_STUBS) && !defined(USE_NSF_STUB_PROCS) */ /* !END!: Do not edit above this line. */ Index: generic/nsfIntDecls.h =================================================================== diff -u -r7a7a3fd2c6a87751e29436786910fd5b9c550d1c -r2ce5a2cab4731930a5b26455c56806fc201de23c --- generic/nsfIntDecls.h (.../nsfIntDecls.h) (revision 7a7a3fd2c6a87751e29436786910fd5b9c550d1c) +++ generic/nsfIntDecls.h (.../nsfIntDecls.h) (revision 2ce5a2cab4731930a5b26455c56806fc201de23c) @@ -31,26 +31,26 @@ typedef struct NsfIntStubs { int magic; - const struct NsfIntStubHooks *hooks; + struct NsfIntStubHooks *hooks; } NsfIntStubs; #ifdef __cplusplus extern "C" { #endif -extern const NsfIntStubs *nsfIntStubsPtr; +extern NsfIntStubs *nsfIntStubsPtr; #ifdef __cplusplus } #endif -#if defined(USE_NSF_STUBS) +#if defined(USE_NSF_STUBS) && !defined(USE_NSF_STUB_PROCS) /* * Inline function declarations: */ -#endif /* defined(USE_NSF_STUBS) */ +#endif /* defined(USE_NSF_STUBS) && !defined(USE_NSF_STUB_PROCS) */ /* !END!: Do not edit above this line. */ Index: generic/nsfStubInit.c =================================================================== diff -u -r7a7a3fd2c6a87751e29436786910fd5b9c550d1c -r2ce5a2cab4731930a5b26455c56806fc201de23c --- generic/nsfStubInit.c (.../nsfStubInit.c) (revision 7a7a3fd2c6a87751e29436786910fd5b9c550d1c) +++ generic/nsfStubInit.c (.../nsfStubInit.c) (revision 2ce5a2cab4731930a5b26455c56806fc201de23c) @@ -24,20 +24,20 @@ /* !BEGIN!: Do not edit below this line. */ -static const NsfIntStubs nsfIntStubs = { +NsfIntStubs nsfIntStubs = { TCL_STUB_MAGIC, - 0, + NULL, }; -static const NsfStubHooks nsfStubHooks = { +static NsfStubHooks nsfStubHooks = { &nsfIntStubs }; -const NsfStubs nsfStubs = { +NsfStubs nsfStubs = { TCL_STUB_MAGIC, &nsfStubHooks, Nsf_Init, /* 0 */ - 0, /* 1 */ + NULL, /* 1 */ NsfIsClass, /* 2 */ NsfGetObject, /* 3 */ NsfGetClass, /* 4 */