Many hyperlinks are disabled.
Use anonymous login
to enable hyperlinks.
Changes In Branch tcloo-64bit Excluding Merge-Ins
This is equivalent to a diff from 27ffaafdb3 to 331944d8da
2022-09-20
| ||
15:04 | ClientData -> void * check-in: a86d508c63 user: jan.nijtmans tags: trunk, main | |
2022-08-30
| ||
16:15 | Unnecessary type-cast Closed-Leaf check-in: 331944d8da user: jan.nijtmans tags: tcloo-64bit | |
14:25 | ClientData -> void * check-in: 3f576fbb4d user: jan.nijtmans tags: tcloo-64bit | |
2022-08-29
| ||
11:58 | Merge trunk check-in: f4147da027 user: jan.nijtmans tags: tcloo-64bit | |
11:55 | Merge trunk Closed-Leaf check-in: 6d161dc356 user: jan.nijtmans tags: tip-627 | |
2022-07-07
| ||
11:03 | Update rules.vc check-in: 27ffaafdb3 user: jan.nijtmans tags: trunk, main | |
2022-06-27
| ||
10:04 | Fix makefile.vc build check-in: 10f3c1aa09 user: jan.nijtmans tags: trunk, main | |
Changes to generic/itcl.decls.
︙ | ︙ | |||
9 10 11 12 13 14 15 | # Declare each of the functions in the public Tcl interface. Note that # the an index should never be reused for a different function in order # to preserve backwards compatibility. declare 2 { int Itcl_RegisterC(Tcl_Interp *interp, const char *name, | | | | | | | | | | | | | | | | > > > > | > > > > > | 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 | # Declare each of the functions in the public Tcl interface. Note that # the an index should never be reused for a different function in order # to preserve backwards compatibility. declare 2 { int Itcl_RegisterC(Tcl_Interp *interp, const char *name, Tcl_CmdProc *proc, void *clientData, Tcl_CmdDeleteProc *deleteProc) } declare 3 { int Itcl_RegisterObjC(Tcl_Interp *interp, const char *name, Tcl_ObjCmdProc *proc, void *clientData, Tcl_CmdDeleteProc *deleteProc) } declare 4 { int Itcl_FindC(Tcl_Interp *interp, const char *name, Tcl_CmdProc **argProcPtr, Tcl_ObjCmdProc **objProcPtr, void **cDataPtr) } declare 5 { void Itcl_InitStack(Itcl_Stack *stack) } declare 6 { void Itcl_DeleteStack(Itcl_Stack *stack) } declare 7 { void Itcl_PushStack(void *cdata, Itcl_Stack *stack) } declare 8 { void *Itcl_PopStack(Itcl_Stack *stack) } declare 9 { void *Itcl_PeekStack(Itcl_Stack *stack) } declare 10 { void *Itcl_GetStackValue(Itcl_Stack *stack, int pos) } declare 11 { void Itcl_InitList(Itcl_List *listPtr) } declare 12 { void Itcl_DeleteList(Itcl_List *listPtr) } declare 13 { Itcl_ListElem *Itcl_CreateListElem(Itcl_List *listPtr) } declare 14 { Itcl_ListElem *Itcl_DeleteListElem(Itcl_ListElem *elemPtr) } declare 15 { Itcl_ListElem *Itcl_InsertList(Itcl_List *listPtr, void *val) } declare 16 { Itcl_ListElem *Itcl_InsertListElem(Itcl_ListElem *pos, void *val) } declare 17 { Itcl_ListElem *Itcl_AppendList(Itcl_List *listPtr, void *val) } declare 18 { Itcl_ListElem *Itcl_AppendListElem(Itcl_ListElem *pos, void *val) } declare 19 { void Itcl_SetListValue(Itcl_ListElem *elemPtr, void *val) } declare 20 { void Itcl_EventuallyFree(void *cdata, Tcl_FreeProc *fproc) } declare 21 { void Itcl_PreserveData(void *cdata) } declare 22 { void Itcl_ReleaseData(void *cdata) } declare 23 { Itcl_InterpState Itcl_SaveInterpState(Tcl_Interp *interp, int status) } declare 24 { int Itcl_RestoreInterpState(Tcl_Interp *interp, Itcl_InterpState state) } declare 25 { void Itcl_DiscardInterpState(Itcl_InterpState state) } declare 26 { void * Itcl_Alloc(size_t size) } declare 27 { void Itcl_Free(void *ptr) } declare 28 { void *ItclGetStackValue(Itcl_Stack *stack, size_t pos) } declare 29 { int Itcl_RegisterObjC2(Tcl_Interp *interp, const char *name, Tcl_ObjCmdProc2 *proc, void *clientData, Tcl_CmdDeleteProc *deleteProc) } declare 30 { int Itcl_FindC2(Tcl_Interp *interp, const char *name, Tcl_CmdProc **argProcPtr, Tcl_ObjCmdProc2 **objProcPtr, void **cDataPtr) } # private API interface itclInt # # Functions used within the package, but not considered "public" # |
︙ | ︙ | |||
162 163 164 165 166 167 168 | declare 19 { void Itcl_DeleteHierIter(ItclHierIter *iter) } declare 20 { ItclClass *Itcl_AdvanceHierIter(ItclHierIter *iter) } declare 21 { | | | | | | | | | | | | | | | | | | 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 | declare 19 { void Itcl_DeleteHierIter(ItclHierIter *iter) } declare 20 { ItclClass *Itcl_AdvanceHierIter(ItclHierIter *iter) } declare 21 { int Itcl_FindClassesCmd(void *clientData, Tcl_Interp *interp, ItclSizeT objc, Tcl_Obj *const objv[]) } declare 22 { int Itcl_FindObjectsCmd(void *clientData, Tcl_Interp *interp, ItclSizeT objc, Tcl_Obj *const objv[]) } declare 24 { int Itcl_DelClassCmd(void *clientData, Tcl_Interp *interp, ItclSizeT objc, Tcl_Obj *const objv[]) } declare 25 { int Itcl_DelObjectCmd(void *clientData, Tcl_Interp *interp, ItclSizeT objc, Tcl_Obj *const objv[]) } declare 26 { int Itcl_ScopeCmd(void *clientData, Tcl_Interp *interp, ItclSizeT objc, Tcl_Obj *const objv[]) } declare 27 { int Itcl_CodeCmd(void *clientData, Tcl_Interp *interp, ItclSizeT objc, Tcl_Obj *const objv[]) } declare 28 { int Itcl_StubCreateCmd(void *clientData, Tcl_Interp *interp, ItclSizeT objc, Tcl_Obj *const objv[]) } declare 29 { int Itcl_StubExistsCmd(void *clientData, Tcl_Interp *interp, ItclSizeT objc, Tcl_Obj *const objv[]) } declare 30 { int Itcl_IsStub(Tcl_Command cmd) } # |
︙ | ︙ | |||
213 214 215 216 217 218 219 | declare 32 { int Itcl_DeleteClass(Tcl_Interp *interp, ItclClass *iclsPtr) } declare 33 { Tcl_Namespace *Itcl_FindClassNamespace(Tcl_Interp *interp, const char *path) } declare 34 { | | | | 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 | declare 32 { int Itcl_DeleteClass(Tcl_Interp *interp, ItclClass *iclsPtr) } declare 33 { Tcl_Namespace *Itcl_FindClassNamespace(Tcl_Interp *interp, const char *path) } declare 34 { int Itcl_HandleClass(void *clientData, Tcl_Interp *interp, ItclSizeT objc, Tcl_Obj *const objv[]) } declare 38 { void Itcl_BuildVirtualTables(ItclClass *iclsPtr) } declare 39 { int Itcl_CreateVariable(Tcl_Interp *interp, ItclClass *iclsPtr, Tcl_Obj *name, char *init, char *config, ItclVariable **ivPtr) |
︙ | ︙ | |||
257 258 259 260 261 262 263 | } # # Functions for manipulating methods and procs # declare 50 { | | | | 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 | } # # Functions for manipulating methods and procs # declare 50 { int Itcl_BodyCmd(void *dummy, Tcl_Interp *interp, ItclSizeT objc, Tcl_Obj *const objv[]) } declare 51 { int Itcl_ConfigBodyCmd(void *dummy, Tcl_Interp *interp, ItclSizeT objc, Tcl_Obj *const objv[]) } declare 52 { int Itcl_CreateMethod(Tcl_Interp *interp, ItclClass *iclsPtr, Tcl_Obj *namePtr, const char *arglist, const char *body) } declare 53 { |
︙ | ︙ | |||
303 304 305 306 307 308 309 | ItclObject *contextObj, ItclSizeT objc, Tcl_Obj *const objv[]) } declare 67 { void Itcl_GetMemberFuncUsage(ItclMemberFunc *mfunc, ItclObject *contextObj, Tcl_Obj *objPtr) } declare 68 { | | | | | 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 | ItclObject *contextObj, ItclSizeT objc, Tcl_Obj *const objv[]) } declare 67 { void Itcl_GetMemberFuncUsage(ItclMemberFunc *mfunc, ItclObject *contextObj, Tcl_Obj *objPtr) } declare 68 { int Itcl_ExecMethod(void *clientData, Tcl_Interp *interp, ItclSizeT objc, Tcl_Obj *const objv[]) } declare 69 { int Itcl_ExecProc(void *clientData, Tcl_Interp *interp, ItclSizeT objc, Tcl_Obj *const objv[]) } declare 71 { int Itcl_ConstructBase(Tcl_Interp *interp, ItclObject *contextObj, ItclClass *contextClass) } declare 72 { int Itcl_InvokeMethodIfExists(Tcl_Interp *interp, const char *name, |
︙ | ︙ | |||
333 334 335 336 337 338 339 | # Commands for parsing class definitions # declare 75 { int Itcl_ParseInit(Tcl_Interp *interp, ItclObjectInfo *info) } declare 76 { | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 385 386 387 388 389 390 391 392 393 394 395 396 397 398 399 400 401 402 403 404 405 406 407 408 409 410 411 412 413 414 415 416 417 418 419 420 421 422 423 424 425 426 427 428 429 430 431 432 433 434 435 436 437 438 439 440 441 442 443 444 445 446 447 448 449 450 451 452 453 454 455 456 457 458 459 460 461 462 463 464 465 466 467 468 469 470 471 472 473 474 475 476 477 478 479 480 481 482 483 484 485 486 487 488 489 490 491 492 493 494 495 496 497 498 499 500 501 502 503 504 505 506 507 508 509 510 511 512 513 514 515 516 517 518 519 520 521 522 523 524 525 526 527 528 529 530 531 532 533 534 535 536 537 538 539 540 541 542 543 544 545 546 547 548 549 550 551 552 553 554 555 556 557 558 559 560 561 562 563 564 565 566 567 568 569 570 571 572 573 574 575 576 577 578 579 580 581 582 583 584 585 586 587 588 589 590 591 592 593 594 595 596 597 598 599 600 601 | # Commands for parsing class definitions # declare 75 { int Itcl_ParseInit(Tcl_Interp *interp, ItclObjectInfo *info) } declare 76 { int Itcl_ClassCmd(void *clientData, Tcl_Interp *interp, ItclSizeT objc, Tcl_Obj *const objv[]) } declare 77 { int Itcl_ClassInheritCmd(void *clientData, Tcl_Interp *interp, ItclSizeT objc, Tcl_Obj *const objv[]) } declare 78 { int Itcl_ClassProtectionCmd(void *clientData, Tcl_Interp *interp, ItclSizeT objc, Tcl_Obj *const objv[]) } declare 79 { int Itcl_ClassConstructorCmd(void *clientData, Tcl_Interp *interp, ItclSizeT objc, Tcl_Obj *const objv[]) } declare 80 { int Itcl_ClassDestructorCmd(void *clientData, Tcl_Interp *interp, ItclSizeT objc, Tcl_Obj *const objv[]) } declare 81 { int Itcl_ClassMethodCmd(void *clientData, Tcl_Interp *interp, ItclSizeT objc, Tcl_Obj *const objv[]) } declare 82 { int Itcl_ClassProcCmd(void *clientData, Tcl_Interp *interp, ItclSizeT objc, Tcl_Obj *const objv[]) } declare 83 { int Itcl_ClassVariableCmd(void *clientData, Tcl_Interp *interp, ItclSizeT objc, Tcl_Obj *const objv[]) } declare 84 { int Itcl_ClassCommonCmd(void *clientData, Tcl_Interp *interp, ItclSizeT objc, Tcl_Obj *const objv[]) } declare 85 { int Itcl_ParseVarResolver(Tcl_Interp *interp, const char *name, Tcl_Namespace *contextNs, int flags, Tcl_Var *rPtr) } # # Commands in the "builtin" namespace # declare 86 { int Itcl_BiInit(Tcl_Interp *interp, ItclObjectInfo *infoPtr) } declare 87 { int Itcl_InstallBiMethods(Tcl_Interp *interp, ItclClass *cdefn) } declare 88 { int Itcl_BiIsaCmd(void *clientData, Tcl_Interp *interp, ItclSizeT objc, Tcl_Obj *const objv[]) } declare 89 { int Itcl_BiConfigureCmd(void *clientData, Tcl_Interp *interp, ItclSizeT objc, Tcl_Obj *const objv[]) } declare 90 { int Itcl_BiCgetCmd(void *clientData, Tcl_Interp *interp, ItclSizeT objc, Tcl_Obj *const objv[]) } declare 91 { int Itcl_BiChainCmd(void *dummy, Tcl_Interp *interp, ItclSizeT objc, Tcl_Obj *const objv[]) } declare 92 { int Itcl_BiInfoClassCmd(void *dummy, Tcl_Interp *interp, ItclSizeT objc, Tcl_Obj *const objv[]) } declare 93 { int Itcl_BiInfoInheritCmd(void *dummy, Tcl_Interp *interp, ItclSizeT objc, Tcl_Obj *const objv[]) } declare 94 { int Itcl_BiInfoHeritageCmd(void *dummy, Tcl_Interp *interp, ItclSizeT objc, Tcl_Obj *const objv[]) } declare 95 { int Itcl_BiInfoFunctionCmd(void *dummy, Tcl_Interp *interp, ItclSizeT objc, Tcl_Obj *const objv[]) } declare 96 { int Itcl_BiInfoVariableCmd(void *dummy, Tcl_Interp *interp, ItclSizeT objc, Tcl_Obj *const objv[]) } declare 97 { int Itcl_BiInfoBodyCmd(void *dummy, Tcl_Interp *interp, ItclSizeT objc, Tcl_Obj *const objv[]) } declare 98 { int Itcl_BiInfoArgsCmd(void *dummy, Tcl_Interp *interp, ItclSizeT objc, Tcl_Obj *const objv[]) } #declare 99 { # int Itcl_DefaultInfoCmd(void *dummy, Tcl_Interp *interp, ItclSizeT objc, # Tcl_Obj *const objv[]) #} # # Ensembles # declare 100 { int Itcl_EnsembleInit(Tcl_Interp *interp) } declare 101 { int Itcl_CreateEnsemble(Tcl_Interp *interp, const char *ensName) } declare 102 { int Itcl_AddEnsemblePart(Tcl_Interp *interp, const char *ensName, const char *partName, const char *usageInfo, Tcl_ObjCmdProc2 *objProc, void *clientData, Tcl_CmdDeleteProc *deleteProc) } declare 103 { int Itcl_GetEnsemblePart(Tcl_Interp *interp, const char *ensName, const char *partName, Tcl_CmdInfo *infoPtr) } declare 104 { int Itcl_IsEnsemble(Tcl_CmdInfo *infoPtr) } declare 105 { int Itcl_GetEnsembleUsage(Tcl_Interp *interp, const char *ensName, Tcl_Obj *objPtr) } declare 106 { int Itcl_GetEnsembleUsageForObj(Tcl_Interp *interp, Tcl_Obj *ensObjPtr, Tcl_Obj *objPtr) } declare 107 { int Itcl_EnsembleCmd(void *clientData, Tcl_Interp *interp, ItclSizeT objc, Tcl_Obj *const objv[]) } declare 108 { int Itcl_EnsPartCmd(void *clientData, Tcl_Interp *interp, ItclSizeT objc, Tcl_Obj *const objv[]) } declare 109 { int Itcl_EnsembleErrorCmd(void *clientData, Tcl_Interp *interp, ItclSizeT objc, Tcl_Obj *const objv[]) } declare 115 { void Itcl_Assert(const char *testExpr, const char *fileName, int lineNum) } declare 116 { int Itcl_IsObjectCmd(void *clientData, Tcl_Interp *interp, ItclSizeT objc, Tcl_Obj *const objv[]) } declare 117 { int Itcl_IsClassCmd(void *clientData, Tcl_Interp *interp, ItclSizeT objc, Tcl_Obj *const objv[]) } # # new commands to use TclOO functionality # declare 140 { int Itcl_FilterAddCmd(void *clientData, Tcl_Interp *interp, ItclSizeT objc, Tcl_Obj *const objv[]) } declare 141 { int Itcl_FilterDeleteCmd(void *clientData, Tcl_Interp *interp, ItclSizeT objc, Tcl_Obj *const objv[]) } declare 142 { int Itcl_ForwardAddCmd(void *clientData, Tcl_Interp *interp, ItclSizeT objc, Tcl_Obj *const objv[]) } declare 143 { int Itcl_ForwardDeleteCmd(void *clientData, Tcl_Interp *interp, ItclSizeT objc, Tcl_Obj *const objv[]) } declare 144 { int Itcl_MixinAddCmd(void *clientData, Tcl_Interp *interp, ItclSizeT objc, Tcl_Obj *const objv[]) } declare 145 { int Itcl_MixinDeleteCmd(void *clientData, Tcl_Interp *interp, ItclSizeT objc, Tcl_Obj *const objv[]) } # # Helper commands # #declare 150 { # int Itcl_BiInfoCmd(void *clientData, Tcl_Interp *interp, ItclSizeT objc, # Tcl_Obj *const objv[]) #} declare 151 { int Itcl_BiInfoUnknownCmd(void *dummy, Tcl_Interp *interp, ItclSizeT objc, Tcl_Obj *const objv[]) } declare 152 { int Itcl_BiInfoVarsCmd(void *dummy, Tcl_Interp *interp, ItclSizeT objc, Tcl_Obj *const objv[]) } declare 153 { int Itcl_CanAccess2(ItclClass *iclsPtr, int protection, Tcl_Namespace *fromNsPtr) } declare 160 { int Itcl_SetCallFrameResolver(Tcl_Interp *interp, Tcl_Resolve *resolvePtr) } declare 161 { int ItclEnsembleSubCmd(void *clientData, Tcl_Interp *interp, const char *ensembleName, ItclSizeT objc, Tcl_Obj *const *objv, const char *functionName) } declare 162 { Tcl_Namespace *Itcl_GetUplevelNamespace(Tcl_Interp *interp, int level) } declare 163 { void *Itcl_GetCallFrameClientData(Tcl_Interp *interp) } declare 165 { int Itcl_SetCallFrameNamespace(Tcl_Interp *interp, Tcl_Namespace *nsPtr) } declare 166 { ItclSizeT Itcl_GetCallFrameObjc(Tcl_Interp *interp) } declare 167 { Tcl_Obj *const *Itcl_GetCallFrameObjv(Tcl_Interp *interp) } declare 168 { int Itcl_NWidgetCmd(void *infoPtr, Tcl_Interp *interp, ItclSizeT objc, Tcl_Obj *const objv[]) } declare 169 { int Itcl_AddOptionCmd(void *infoPtr, Tcl_Interp *interp, ItclSizeT objc, Tcl_Obj *const objv[]) } declare 170 { int Itcl_AddComponentCmd(void *infoPtr, Tcl_Interp *interp, ItclSizeT objc, Tcl_Obj *const objv[]) } declare 171 { int Itcl_BiInfoOptionCmd(void *dummy, Tcl_Interp *interp, ItclSizeT objc, Tcl_Obj *const objv[]) } declare 172 { int Itcl_BiInfoComponentCmd(void *dummy, Tcl_Interp *interp, ItclSizeT objc, Tcl_Obj *const objv[]) } declare 173 { int Itcl_RenameCommand(Tcl_Interp *interp, const char *oldName, const char *newName) } declare 174 { int Itcl_PushCallFrame(Tcl_Interp *interp, Tcl_CallFrame *framePtr, |
︙ | ︙ | |||
608 609 610 611 612 613 614 | const char *name, const char *name2, const char *value, ItclObject *contextIoPtr, ItclClass *contextIclsPtr) } declare 179 { Tcl_Obj * ItclCapitalize(const char *str) } declare 180 { | | | | 617 618 619 620 621 622 623 624 625 626 627 628 629 630 631 632 | const char *name, const char *name2, const char *value, ItclObject *contextIoPtr, ItclClass *contextIclsPtr) } declare 179 { Tcl_Obj * ItclCapitalize(const char *str) } declare 180 { int ItclClassBaseCmd(void *clientData, Tcl_Interp *interp, int flags, ItclSizeT objc, Tcl_Obj *const objv[], ItclClass **iclsPtrPtr) } declare 181 { int ItclCreateComponent(Tcl_Interp *interp, ItclClass *iclsPtr, Tcl_Obj *componentPtr, int type, ItclComponent **icPtrPtr) } declare 182 { void Itcl_SetContext(Tcl_Interp *interp, ItclObject *ioPtr) |
︙ | ︙ |
Changes to generic/itcl2TclOO.c.
︙ | ︙ | |||
66 67 68 69 70 71 72 | static int Tcl_InvokeClassProcedureMethod( Tcl_Interp *interp, Tcl_Obj *namePtr, /* name of the method */ Tcl_Namespace *nsPtr, /* namespace for calling method */ ProcedureMethod *pmPtr, /* method type specific data */ | | | 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 | static int Tcl_InvokeClassProcedureMethod( Tcl_Interp *interp, Tcl_Obj *namePtr, /* name of the method */ Tcl_Namespace *nsPtr, /* namespace for calling method */ ProcedureMethod *pmPtr, /* method type specific data */ ItclSizeT objc, /* Number of arguments. */ Tcl_Obj *const *objv) /* Arguments as actually seen. */ { Proc *procPtr = pmPtr->procPtr; CallFrame *framePtr = NULL; CallFrame **framePtrPtr1 = &framePtr; Tcl_CallFrame **framePtrPtr = (Tcl_CallFrame **)framePtrPtr1; int result; |
︙ | ︙ | |||
143 144 145 146 147 148 149 | return result; } int Itcl_InvokeProcedureMethod( void *clientData, /* Pointer to some per-method context. */ Tcl_Interp *interp, | | | 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 | return result; } int Itcl_InvokeProcedureMethod( void *clientData, /* Pointer to some per-method context. */ Tcl_Interp *interp, ItclSizeT objc, /* Number of arguments. */ Tcl_Obj *const *objv) /* Arguments as actually seen. */ { Tcl_Namespace *nsPtr; Method *mPtr; mPtr = (Method *)clientData; if (mPtr->declaringClassPtr == NULL) { |
︙ | ︙ | |||
358 359 360 361 362 363 364 | return namePtr; } int Itcl_SelfCmd( TCL_UNUSED(void *), Tcl_Interp *interp, | | | 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 | return namePtr; } int Itcl_SelfCmd( TCL_UNUSED(void *), Tcl_Interp *interp, ItclSizeT objc, Tcl_Obj *const *objv) { Interp *iPtr = (Interp *) interp; CallFrame *framePtr = iPtr->varFramePtr; CallContext *contextPtr; if (!Itcl_IsMethodCallFrame(interp)) { |
︙ | ︙ |
Changes to generic/itcl2TclOO.h.
︙ | ︙ | |||
21 22 23 24 25 26 27 | ProcErrorProc *errProc, void *clientData, Tcl_Obj *nameObj, Tcl_Obj *argsObj, Tcl_Obj *bodyObj, void **clientData2); MODULE_SCOPE int Itcl_PublicObjectCmd(void *clientData, Tcl_Interp *interp, Tcl_Class clsPtr, size_t objc, Tcl_Obj *const *objv); MODULE_SCOPE Tcl_Method Itcl_NewForwardClassMethod(Tcl_Interp *interp, Tcl_Class clsPtr, int flags, Tcl_Obj *nameObj, Tcl_Obj *prefixObj); MODULE_SCOPE int Itcl_SelfCmd(void *clientData, Tcl_Interp *interp, | | | | 21 22 23 24 25 26 27 28 29 30 31 32 33 | ProcErrorProc *errProc, void *clientData, Tcl_Obj *nameObj, Tcl_Obj *argsObj, Tcl_Obj *bodyObj, void **clientData2); MODULE_SCOPE int Itcl_PublicObjectCmd(void *clientData, Tcl_Interp *interp, Tcl_Class clsPtr, size_t objc, Tcl_Obj *const *objv); MODULE_SCOPE Tcl_Method Itcl_NewForwardClassMethod(Tcl_Interp *interp, Tcl_Class clsPtr, int flags, Tcl_Obj *nameObj, Tcl_Obj *prefixObj); MODULE_SCOPE int Itcl_SelfCmd(void *clientData, Tcl_Interp *interp, ItclSizeT objc, Tcl_Obj *const *objv); MODULE_SCOPE int Itcl_IsMethodCallFrame(Tcl_Interp *interp); MODULE_SCOPE int Itcl_InvokeEnsembleMethod(Tcl_Interp *interp, Tcl_Namespace *nsPtr, Tcl_Obj *namePtr, Tcl_Proc *procPtr, size_t objc, Tcl_Obj *const *objv); MODULE_SCOPE int Itcl_InvokeProcedureMethod(void *clientData, Tcl_Interp *interp, ItclSizeT objc, Tcl_Obj *const *objv); |
Changes to generic/itclBase.c.
︙ | ︙ | |||
11 12 13 14 15 16 17 | */ #include <stdlib.h> #include "itclInt.h" #include "itclUuid.h" static Tcl_NamespaceDeleteProc FreeItclObjectInfo; | | | | 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 | */ #include <stdlib.h> #include "itclInt.h" #include "itclUuid.h" static Tcl_NamespaceDeleteProc FreeItclObjectInfo; static Tcl_ObjCmdProc2 ItclSetHullWindowName; static Tcl_ObjCmdProc2 ItclCheckSetItclHull; MODULE_SCOPE const ItclStubs itclStubs; static int Initialize(Tcl_Interp *interp); static const char initScript[] = "namespace eval ::itcl {\n" |
︙ | ︙ | |||
122 123 124 125 126 127 128 | static const Tcl_ObjectMetadataType objMDT = { TCL_OO_METADATA_VERSION_CURRENT, "ItclObject", ItclDeleteObjectMetadata, /* Not really used yet */ NULL }; | | | | | | 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 | static const Tcl_ObjectMetadataType objMDT = { TCL_OO_METADATA_VERSION_CURRENT, "ItclObject", ItclDeleteObjectMetadata, /* Not really used yet */ NULL }; static Tcl_MethodCallProc2 RootCallProc; const Tcl_MethodType2 itclRootMethodType = { TCL_OO_METHOD_VERSION_2, "itcl root method", RootCallProc, NULL, NULL }; static int RootCallProc( void *clientData, Tcl_Interp *interp, Tcl_ObjectContext context, ItclSizeT objc, Tcl_Obj *const *objv) { Tcl_Object oPtr = Tcl_ObjectContextObject(context); ItclObject *ioPtr = (ItclObject *)Tcl_ObjectGetMetadata(oPtr, &objMDT); ItclRootMethodProc *proc = (ItclRootMethodProc *)clientData; return (*proc)(ioPtr, interp, objc, objv); |
︙ | ︙ | |||
296 297 298 299 300 301 302 | Tcl_SetAssocData(interp, ITCL_INTERP_DATA, NULL, infoPtr); Itcl_PreserveData(infoPtr); root = Tcl_NewObjectInstance(interp, tclCls, "::itcl::Root", NULL, 0, NULL, 0); | | | | | 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 | Tcl_SetAssocData(interp, ITCL_INTERP_DATA, NULL, infoPtr); Itcl_PreserveData(infoPtr); root = Tcl_NewObjectInstance(interp, tclCls, "::itcl::Root", NULL, 0, NULL, 0); Tcl_NewMethod2(interp, Tcl_GetObjectAsClass(root), Tcl_NewStringObj("unknown", -1), 0, &itclRootMethodType, (void *)ItclUnknownGuts); Tcl_NewMethod2(interp, Tcl_GetObjectAsClass(root), Tcl_NewStringObj("ItclConstructBase", -1), 0, &itclRootMethodType, (void *)ItclConstructGuts); Tcl_NewMethod2(interp, Tcl_GetObjectAsClass(root), Tcl_NewStringObj("info", -1), 1, &itclRootMethodType, (void *)ItclInfoGuts); /* first create the Itcl base class as root of itcl classes */ if (Tcl_EvalEx(interp, clazzClassScript, -1, 0) != TCL_OK) { Tcl_Panic("cannot create Itcl root class ::itcl::clazz"); } |
︙ | ︙ | |||
380 381 382 383 384 385 386 | (Tcl_Export(interp, itclNs, "forward", 0) != TCL_OK) || (Tcl_Export(interp, itclNs, "local", 0) != TCL_OK) || (Tcl_Export(interp, itclNs, "mixin", 0) != TCL_OK) || (Tcl_Export(interp, itclNs, "scope", 0) != TCL_OK)) { return TCL_ERROR; } | | | | 380 381 382 383 384 385 386 387 388 389 390 391 392 393 394 395 396 397 | (Tcl_Export(interp, itclNs, "forward", 0) != TCL_OK) || (Tcl_Export(interp, itclNs, "local", 0) != TCL_OK) || (Tcl_Export(interp, itclNs, "mixin", 0) != TCL_OK) || (Tcl_Export(interp, itclNs, "scope", 0) != TCL_OK)) { return TCL_ERROR; } Tcl_CreateObjCommand2(interp, ITCL_NAMESPACE"::internal::commands::sethullwindowname", ItclSetHullWindowName, infoPtr, NULL); Tcl_CreateObjCommand2(interp, ITCL_NAMESPACE"::internal::commands::checksetitclhull", ItclCheckSetItclHull, infoPtr, NULL); /* * Set up the variables containing version info. */ |
︙ | ︙ | |||
525 526 527 528 529 530 531 | * * ------------------------------------------------------------------------ */ static int ItclSetHullWindowName( void *clientData, /* infoPtr */ TCL_UNUSED(Tcl_Interp *),/* current interpreter */ | | | 525 526 527 528 529 530 531 532 533 534 535 536 537 538 539 | * * ------------------------------------------------------------------------ */ static int ItclSetHullWindowName( void *clientData, /* infoPtr */ TCL_UNUSED(Tcl_Interp *),/* current interpreter */ ItclSizeT objc, /* number of arguments */ Tcl_Obj *const objv[]) /* argument objects */ { ItclObjectInfo *infoPtr; infoPtr = (ItclObjectInfo *)clientData; if ((infoPtr->currIoPtr != NULL) && (objc > 1)) { infoPtr->currIoPtr->hullWindowNamePtr = objv[1]; |
︙ | ︙ | |||
549 550 551 552 553 554 555 | * * ------------------------------------------------------------------------ */ static int ItclCheckSetItclHull( void *clientData, /* infoPtr */ Tcl_Interp *interp, /* current interpreter */ | | | 549 550 551 552 553 554 555 556 557 558 559 560 561 562 563 | * * ------------------------------------------------------------------------ */ static int ItclCheckSetItclHull( void *clientData, /* infoPtr */ Tcl_Interp *interp, /* current interpreter */ ItclSizeT objc, /* number of arguments */ Tcl_Obj *const objv[]) /* argument objects */ { Tcl_HashEntry *hPtr; Tcl_Obj *objPtr; ItclObject *ioPtr; ItclVariable *ivPtr; ItclObjectInfo *infoPtr; |
︙ | ︙ |
Changes to generic/itclBuiltin.c.
︙ | ︙ | |||
84 85 86 87 88 89 90 | " append msg \"you can set the environment variable ITCL_LIBRARY to point\n\"\n" " append msg \"to the library directory.\n\"\n" " error $msg\n" " }\n" " _find_hull_init\n" "}"; | | | | | | | | | | | | | 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 | " append msg \"you can set the environment variable ITCL_LIBRARY to point\n\"\n" " append msg \"to the library directory.\n\"\n" " error $msg\n" " }\n" " _find_hull_init\n" "}"; static Tcl_ObjCmdProc2 Itcl_BiDestroyCmd; static Tcl_ObjCmdProc2 ItclExtendedConfigure; static Tcl_ObjCmdProc2 ItclExtendedCget; static Tcl_ObjCmdProc2 ItclExtendedSetGet; static Tcl_ObjCmdProc2 Itcl_BiCreateHullCmd; static Tcl_ObjCmdProc2 Itcl_BiSetupComponentCmd; static Tcl_ObjCmdProc2 Itcl_BiKeepComponentOptionCmd; static Tcl_ObjCmdProc2 Itcl_BiIgnoreComponentOptionCmd; static Tcl_ObjCmdProc2 Itcl_BiInitOptionsCmd; /* * FORWARD DECLARATIONS */ static Tcl_Obj* ItclReportPublicOpt(Tcl_Interp *interp, ItclVariable *ivPtr, ItclObject *contextIoPtr); static Tcl_ObjCmdProc2 ItclBiClassUnknownCmd; /* * Standard list of built-in methods for all objects. */ typedef struct BiMethod { const char* name; /* method name */ const char* usage; /* string describing usage */ const char* registration;/* registration name for C proc */ Tcl_ObjCmdProc2 *proc; /* implementation C proc */ int flags; /* flag for which type of class to be used */ } BiMethod; static const BiMethod BiMethodList[] = { { "callinstance", "<instancename>", "@itcl-builtin-callinstance", |
︙ | ︙ | |||
336 337 338 339 340 341 342 | * just before the class definition is parsed. */ Tcl_DStringInit(&buffer); for (i=0; i < BiMethodListLen; i++) { Tcl_DStringSetLength(&buffer, 0); Tcl_DStringAppend(&buffer, "::itcl::builtin::", -1); Tcl_DStringAppend(&buffer, BiMethodList[i].name, -1); | | | | | 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 | * just before the class definition is parsed. */ Tcl_DStringInit(&buffer); for (i=0; i < BiMethodListLen; i++) { Tcl_DStringSetLength(&buffer, 0); Tcl_DStringAppend(&buffer, "::itcl::builtin::", -1); Tcl_DStringAppend(&buffer, BiMethodList[i].name, -1); Tcl_CreateObjCommand2(interp, Tcl_DStringValue(&buffer), BiMethodList[i].proc, infoPtr, NULL); } Tcl_DStringFree(&buffer); Tcl_CreateObjCommand2(interp, "::itcl::builtin::chain", Itcl_BiChainCmd, NULL, NULL); Tcl_CreateObjCommand2(interp, "::itcl::builtin::classunknown", ItclBiClassUnknownCmd, infoPtr, NULL); ItclInfoInit(interp, infoPtr); /* * Export all commands in the built-in namespace so we can * import them later on. */ |
︙ | ︙ | |||
488 489 490 491 492 493 494 | * ------------------------------------------------------------------------ */ int Itcl_BiIsaCmd( TCL_UNUSED(void *), /* class definition */ Tcl_Interp *interp, /* current interpreter */ | | | 488 489 490 491 492 493 494 495 496 497 498 499 500 501 502 | * ------------------------------------------------------------------------ */ int Itcl_BiIsaCmd( TCL_UNUSED(void *), /* class definition */ Tcl_Interp *interp, /* current interpreter */ ItclSizeT objc, /* number of arguments */ Tcl_Obj *const objv[]) /* argument objects */ { ItclClass *iclsPtr; const char *token; ItclClass *contextIclsPtr; ItclObject *contextIoPtr; |
︙ | ︙ | |||
567 568 569 570 571 572 573 | * ------------------------------------------------------------------------ */ int Itcl_BiConfigureCmd( TCL_UNUSED(void *), /* class definition */ Tcl_Interp *interp, /* current interpreter */ | | | 567 568 569 570 571 572 573 574 575 576 577 578 579 580 581 | * ------------------------------------------------------------------------ */ int Itcl_BiConfigureCmd( TCL_UNUSED(void *), /* class definition */ Tcl_Interp *interp, /* current interpreter */ ItclSizeT objc, /* number of arguments */ Tcl_Obj *const objv[]) /* argument objects */ { ItclClass *contextIclsPtr; ItclObject *contextIoPtr; Tcl_Obj *resultPtr; Tcl_Obj *objPtr; |
︙ | ︙ | |||
841 842 843 844 845 846 847 | * ------------------------------------------------------------------------ */ int Itcl_BiCgetCmd( TCL_UNUSED(void *), /* class definition */ Tcl_Interp *interp, /* current interpreter */ | | | 841 842 843 844 845 846 847 848 849 850 851 852 853 854 855 | * ------------------------------------------------------------------------ */ int Itcl_BiCgetCmd( TCL_UNUSED(void *), /* class definition */ Tcl_Interp *interp, /* current interpreter */ ItclSizeT objc, /* number of arguments */ Tcl_Obj *const objv[]) /* argument objects */ { ItclClass *contextIclsPtr; ItclObject *contextIoPtr; Tcl_HashEntry *hPtr; ItclVarLookup *vlookup; |
︙ | ︙ | |||
1074 1075 1076 1077 1078 1079 1080 | * ------------------------------------------------------------------------ */ static int NRBiChainCmd( TCL_UNUSED(void *), /* not used */ Tcl_Interp *interp, /* current interpreter */ | | | 1074 1075 1076 1077 1078 1079 1080 1081 1082 1083 1084 1085 1086 1087 1088 | * ------------------------------------------------------------------------ */ static int NRBiChainCmd( TCL_UNUSED(void *), /* not used */ Tcl_Interp *interp, /* current interpreter */ ItclSizeT objc, /* number of arguments */ Tcl_Obj *const objv[]) /* argument objects */ { int result = TCL_OK; ItclClass *contextIclsPtr; ItclObject *contextIoPtr; |
︙ | ︙ | |||
1206 1207 1208 1209 1210 1211 1212 | return result; } int Itcl_BiChainCmd( void *clientData, Tcl_Interp *interp, | | | | | 1206 1207 1208 1209 1210 1211 1212 1213 1214 1215 1216 1217 1218 1219 1220 1221 1222 1223 1224 1225 1226 1227 1228 1229 1230 1231 1232 1233 1234 1235 | return result; } int Itcl_BiChainCmd( void *clientData, Tcl_Interp *interp, ItclSizeT objc, Tcl_Obj *const *objv) { return Tcl_NRCallObjProc2(interp, NRBiChainCmd, clientData, objc, objv); } static int CallCreateObject( void *data[], Tcl_Interp *interp, int result) { Tcl_CallFrame frame; Tcl_Namespace *nsPtr; ItclClass *iclsPtr = (ItclClass *)data[0]; ItclSizeT objc = PTR2INT(data[1]); Tcl_Obj *const *objv = (Tcl_Obj *const *)data[2]; if (result != TCL_OK) { return result; } nsPtr = Itcl_GetUplevelNamespace(interp, 1); if (Itcl_PushCallFrame(interp, &frame, nsPtr, |
︙ | ︙ | |||
1244 1245 1246 1247 1248 1249 1250 | return result; } static int PrepareCreateObject( Tcl_Interp *interp, ItclClass *iclsPtr, | | | 1244 1245 1246 1247 1248 1249 1250 1251 1252 1253 1254 1255 1256 1257 1258 | return result; } static int PrepareCreateObject( Tcl_Interp *interp, ItclClass *iclsPtr, ItclSizeT objc, Tcl_Obj *const *objv) { Tcl_HashEntry *hPtr; Tcl_Obj **newObjv; void *callbackPtr; const char *funcName; int result; |
︙ | ︙ | |||
1311 1312 1313 1314 1315 1316 1317 | * classunknown <object> <methodname> ?<arg> <arg>...? * * ------------------------------------------------------------------------ */ static int ItclBiClassUnknownCmd( | | | | 1311 1312 1313 1314 1315 1316 1317 1318 1319 1320 1321 1322 1323 1324 1325 1326 1327 | * classunknown <object> <methodname> ?<arg> <arg>...? * * ------------------------------------------------------------------------ */ static int ItclBiClassUnknownCmd( void *clientData, /* ItclObjectInfo Ptr */ Tcl_Interp *interp, /* current interpreter */ ItclSizeT objc, /* number of arguments */ Tcl_Obj *const objv[]) /* argument objects */ { FOREACH_HASH_DECLS; Tcl_HashEntry *hPtr2; Tcl_Obj **newObjv; Tcl_Obj **lObjv; Tcl_Obj *listPtr; |
︙ | ︙ | |||
1589 1590 1591 1592 1593 1594 1595 | * ------------------------------------------------------------------------ */ int ItclUnknownGuts( ItclObject *ioPtr, /* The ItclObject seeking method */ Tcl_Interp *interp, /* current interpreter */ | | | 1589 1590 1591 1592 1593 1594 1595 1596 1597 1598 1599 1600 1601 1602 1603 | * ------------------------------------------------------------------------ */ int ItclUnknownGuts( ItclObject *ioPtr, /* The ItclObject seeking method */ Tcl_Interp *interp, /* current interpreter */ ItclSizeT objc, /* number of arguments */ Tcl_Obj *const objv[]) /* argument objects */ { FOREACH_HASH_DECLS; Tcl_HashEntry *hPtr2; Tcl_Obj **newObjv; Tcl_Obj **lObjv; Tcl_Obj *listPtr = NULL; |
︙ | ︙ | |||
1921 1922 1923 1924 1925 1926 1927 | * ------------------------------------------------------------------------ */ static int ItclExtendedConfigure( TCL_UNUSED(void *), /* class definition */ Tcl_Interp *interp, /* current interpreter */ | | | 1921 1922 1923 1924 1925 1926 1927 1928 1929 1930 1931 1932 1933 1934 1935 | * ------------------------------------------------------------------------ */ static int ItclExtendedConfigure( TCL_UNUSED(void *), /* class definition */ Tcl_Interp *interp, /* current interpreter */ ItclSizeT objc, /* number of arguments */ Tcl_Obj *const objv[]) /* argument objects */ { FOREACH_HASH_DECLS; Tcl_HashTable unique; Tcl_HashEntry *hPtr2; Tcl_HashEntry *hPtr3; Tcl_Object oPtr; |
︙ | ︙ | |||
2588 2589 2590 2591 2592 2593 2594 | * ------------------------------------------------------------------------ */ static int ItclExtendedCget( TCL_UNUSED(void *), /* class definition */ Tcl_Interp *interp, /* current interpreter */ | | | 2588 2589 2590 2591 2592 2593 2594 2595 2596 2597 2598 2599 2600 2601 2602 | * ------------------------------------------------------------------------ */ static int ItclExtendedCget( TCL_UNUSED(void *), /* class definition */ Tcl_Interp *interp, /* current interpreter */ ItclSizeT objc, /* number of arguments */ Tcl_Obj *const objv[]) /* argument objects */ { Tcl_HashEntry *hPtr; Tcl_HashEntry *hPtr2; Tcl_HashEntry *hPtr3; Tcl_Obj *objPtr2; Tcl_Obj *objPtr; |
︙ | ︙ | |||
2826 2827 2828 2829 2830 2831 2832 | * ------------------------------------------------------------------------ */ static int ItclExtendedSetGet( TCL_UNUSED(void *), /* class definition */ Tcl_Interp *interp, /* current interpreter */ | | | 2826 2827 2828 2829 2830 2831 2832 2833 2834 2835 2836 2837 2838 2839 2840 | * ------------------------------------------------------------------------ */ static int ItclExtendedSetGet( TCL_UNUSED(void *), /* class definition */ Tcl_Interp *interp, /* current interpreter */ ItclSizeT objc, /* number of arguments */ Tcl_Obj *const objv[]) /* argument objects */ { ItclClass *contextIclsPtr; ItclObject *contextIoPtr; Tcl_HashEntry *hPtr; Tcl_Obj **newObjv; |
︙ | ︙ | |||
2944 2945 2946 2947 2948 2949 2950 | * ------------------------------------------------------------------------ */ int Itcl_BiInstallComponentCmd( TCL_UNUSED(void *), /* class definition */ Tcl_Interp *interp, /* current interpreter */ | | | 2944 2945 2946 2947 2948 2949 2950 2951 2952 2953 2954 2955 2956 2957 2958 | * ------------------------------------------------------------------------ */ int Itcl_BiInstallComponentCmd( TCL_UNUSED(void *), /* class definition */ Tcl_Interp *interp, /* current interpreter */ ItclSizeT objc, /* number of arguments */ Tcl_Obj *const objv[]) /* argument objects */ { FOREACH_HASH_DECLS; Tcl_Obj ** newObjv; ItclClass *contextIclsPtr; ItclObject *contextIoPtr; ItclDelegatedOption *idoPtr; |
︙ | ︙ | |||
3078 3079 3080 3081 3082 3083 3084 | * ------------------------------------------------------------------------ */ static int Itcl_BiDestroyCmd( TCL_UNUSED(void *), /* class definition */ Tcl_Interp *interp, /* current interpreter */ | | | 3078 3079 3080 3081 3082 3083 3084 3085 3086 3087 3088 3089 3090 3091 3092 | * ------------------------------------------------------------------------ */ static int Itcl_BiDestroyCmd( TCL_UNUSED(void *), /* class definition */ Tcl_Interp *interp, /* current interpreter */ ItclSizeT objc, /* number of arguments */ Tcl_Obj *const objv[]) /* argument objects */ { Tcl_Obj **newObjv; ItclClass *contextIclsPtr; ItclObject *contextIoPtr; int result; |
︙ | ︙ | |||
3155 3156 3157 3158 3159 3160 3161 | * ------------------------------------------------------------------------ */ int Itcl_BiCallInstanceCmd( TCL_UNUSED(void *), /* class definition */ Tcl_Interp *interp, /* current interpreter */ | | | 3155 3156 3157 3158 3159 3160 3161 3162 3163 3164 3165 3166 3167 3168 3169 | * ------------------------------------------------------------------------ */ int Itcl_BiCallInstanceCmd( TCL_UNUSED(void *), /* class definition */ Tcl_Interp *interp, /* current interpreter */ ItclSizeT objc, /* number of arguments */ Tcl_Obj *const objv[]) /* argument objects */ { Tcl_HashEntry *hPtr; Tcl_Obj *objPtr; Tcl_Obj **newObjv; ItclClass *contextIclsPtr; ItclObject *contextIoPtr; |
︙ | ︙ | |||
3222 3223 3224 3225 3226 3227 3228 | * ------------------------------------------------------------------------ */ int Itcl_BiGetInstanceVarCmd( TCL_UNUSED(void *), /* class definition */ Tcl_Interp *interp, /* current interpreter */ | | | 3222 3223 3224 3225 3226 3227 3228 3229 3230 3231 3232 3233 3234 3235 3236 | * ------------------------------------------------------------------------ */ int Itcl_BiGetInstanceVarCmd( TCL_UNUSED(void *), /* class definition */ Tcl_Interp *interp, /* current interpreter */ ItclSizeT objc, /* number of arguments */ Tcl_Obj *const objv[]) /* argument objects */ { Tcl_HashEntry *hPtr; Tcl_Obj *objPtr; Tcl_Obj **newObjv; ItclClass *contextIclsPtr; ItclObject *contextIoPtr; |
︙ | ︙ | |||
3288 3289 3290 3291 3292 3293 3294 | * ------------------------------------------------------------------------ */ int Itcl_BiMyTypeMethodCmd( TCL_UNUSED(void *), /* class definition */ Tcl_Interp *interp, /* current interpreter */ | | | 3288 3289 3290 3291 3292 3293 3294 3295 3296 3297 3298 3299 3300 3301 3302 | * ------------------------------------------------------------------------ */ int Itcl_BiMyTypeMethodCmd( TCL_UNUSED(void *), /* class definition */ Tcl_Interp *interp, /* current interpreter */ ItclSizeT objc, /* number of arguments */ Tcl_Obj *const objv[]) /* argument objects */ { Tcl_Obj *objPtr; Tcl_Obj *resultPtr; ItclClass *contextIclsPtr; ItclObject *contextIoPtr; int i; |
︙ | ︙ | |||
3338 3339 3340 3341 3342 3343 3344 | * ------------------------------------------------------------------------ */ int Itcl_BiMyMethodCmd( TCL_UNUSED(void *), /* class definition */ Tcl_Interp *interp, /* current interpreter */ | | | 3338 3339 3340 3341 3342 3343 3344 3345 3346 3347 3348 3349 3350 3351 3352 | * ------------------------------------------------------------------------ */ int Itcl_BiMyMethodCmd( TCL_UNUSED(void *), /* class definition */ Tcl_Interp *interp, /* current interpreter */ ItclSizeT objc, /* number of arguments */ Tcl_Obj *const objv[]) /* argument objects */ { Tcl_Obj *resultPtr; int i; ItclClass *contextIclsPtr; ItclObject *contextIoPtr; |
︙ | ︙ | |||
3387 3388 3389 3390 3391 3392 3393 | * ------------------------------------------------------------------------ */ int Itcl_BiMyProcCmd( TCL_UNUSED(void *), /* class definition */ Tcl_Interp *interp, /* current interpreter */ | | | 3387 3388 3389 3390 3391 3392 3393 3394 3395 3396 3397 3398 3399 3400 3401 | * ------------------------------------------------------------------------ */ int Itcl_BiMyProcCmd( TCL_UNUSED(void *), /* class definition */ Tcl_Interp *interp, /* current interpreter */ ItclSizeT objc, /* number of arguments */ Tcl_Obj *const objv[]) /* argument objects */ { Tcl_Obj *objPtr; Tcl_Obj *resultPtr; ItclClass *contextIclsPtr; ItclObject *contextIoPtr; int i; |
︙ | ︙ | |||
3438 3439 3440 3441 3442 3443 3444 | * ------------------------------------------------------------------------ */ int Itcl_BiMyTypeVarCmd( TCL_UNUSED(void *), /* class definition */ Tcl_Interp *interp, /* current interpreter */ | | | 3438 3439 3440 3441 3442 3443 3444 3445 3446 3447 3448 3449 3450 3451 3452 | * ------------------------------------------------------------------------ */ int Itcl_BiMyTypeVarCmd( TCL_UNUSED(void *), /* class definition */ Tcl_Interp *interp, /* current interpreter */ ItclSizeT objc, /* number of arguments */ Tcl_Obj *const objv[]) /* argument objects */ { Tcl_Obj *objPtr; Tcl_Obj *resultPtr; ItclClass *contextIclsPtr; ItclObject *contextIoPtr; int i; |
︙ | ︙ | |||
3490 3491 3492 3493 3494 3495 3496 | * ------------------------------------------------------------------------ */ int Itcl_BiMyVarCmd( TCL_UNUSED(void *), /* class definition */ Tcl_Interp *interp, /* current interpreter */ | | | 3490 3491 3492 3493 3494 3495 3496 3497 3498 3499 3500 3501 3502 3503 3504 | * ------------------------------------------------------------------------ */ int Itcl_BiMyVarCmd( TCL_UNUSED(void *), /* class definition */ Tcl_Interp *interp, /* current interpreter */ ItclSizeT objc, /* number of arguments */ Tcl_Obj *const objv[]) /* argument objects */ { Tcl_Obj *resultPtr; ItclClass *contextIclsPtr; ItclObject *contextIoPtr; /* |
︙ | ︙ | |||
3534 3535 3536 3537 3538 3539 3540 | * ------------------------------------------------------------------------ */ int Itcl_BiItclHullCmd( TCL_UNUSED(void *), /* class definition */ Tcl_Interp *interp, /* current interpreter */ | | | 3534 3535 3536 3537 3538 3539 3540 3541 3542 3543 3544 3545 3546 3547 3548 | * ------------------------------------------------------------------------ */ int Itcl_BiItclHullCmd( TCL_UNUSED(void *), /* class definition */ Tcl_Interp *interp, /* current interpreter */ ItclSizeT objc, /* number of arguments */ Tcl_Obj *const objv[]) /* argument objects */ { ItclClass *contextIclsPtr; ItclObject *contextIoPtr; const char *val; /* |
︙ | ︙ | |||
3576 3577 3578 3579 3580 3581 3582 | * * ------------------------------------------------------------------------ */ static int Itcl_BiCreateHullCmd( void *clientData, /* info for all known objects */ Tcl_Interp *interp, /* current interpreter */ | | | 3576 3577 3578 3579 3580 3581 3582 3583 3584 3585 3586 3587 3588 3589 3590 | * * ------------------------------------------------------------------------ */ static int Itcl_BiCreateHullCmd( void *clientData, /* info for all known objects */ Tcl_Interp *interp, /* current interpreter */ ItclSizeT objc, /* number of arguments */ Tcl_Obj *const objv[]) /* argument objects */ { int result; ItclObjectInfo *infoPtr = (ItclObjectInfo*)clientData; ItclShowArgs(1, "Itcl_BiCreateHullCmd", objc, objv); if (!infoPtr->itclHullCmdsInitted) { |
︙ | ︙ | |||
3611 3612 3613 3614 3615 3616 3617 | * * ------------------------------------------------------------------------ */ static int Itcl_BiSetupComponentCmd( void *clientData, /* info for all known objects */ Tcl_Interp *interp, /* current interpreter */ | | | 3611 3612 3613 3614 3615 3616 3617 3618 3619 3620 3621 3622 3623 3624 3625 | * * ------------------------------------------------------------------------ */ static int Itcl_BiSetupComponentCmd( void *clientData, /* info for all known objects */ Tcl_Interp *interp, /* current interpreter */ ItclSizeT objc, /* number of arguments */ Tcl_Obj *const objv[]) /* argument objects */ { int result; ItclObjectInfo *infoPtr = (ItclObjectInfo*)clientData; ItclShowArgs(1, "Itcl_BiSetupComponentCmd", objc, objv); if (!infoPtr->itclHullCmdsInitted) { |
︙ | ︙ | |||
3647 3648 3649 3650 3651 3652 3653 | * * ------------------------------------------------------------------------ */ static int Itcl_BiInitOptionsCmd( void *clientData, /* info for all known objects */ Tcl_Interp *interp, /* current interpreter */ | | | 3647 3648 3649 3650 3651 3652 3653 3654 3655 3656 3657 3658 3659 3660 3661 | * * ------------------------------------------------------------------------ */ static int Itcl_BiInitOptionsCmd( void *clientData, /* info for all known objects */ Tcl_Interp *interp, /* current interpreter */ ItclSizeT objc, /* number of arguments */ Tcl_Obj *const objv[]) /* argument objects */ { int result; ItclObjectInfo *infoPtr = (ItclObjectInfo*)clientData; ItclClass *iclsPtr; ItclObject *ioPtr; ItclDelegatedOption *idoptPtr; |
︙ | ︙ | |||
3699 3700 3701 3702 3703 3704 3705 | * * ------------------------------------------------------------------------ */ static int Itcl_BiKeepComponentOptionCmd( void *clientData, /* info for all known objects */ Tcl_Interp *interp, /* current interpreter */ | | | 3699 3700 3701 3702 3703 3704 3705 3706 3707 3708 3709 3710 3711 3712 3713 | * * ------------------------------------------------------------------------ */ static int Itcl_BiKeepComponentOptionCmd( void *clientData, /* info for all known objects */ Tcl_Interp *interp, /* current interpreter */ ItclSizeT objc, /* number of arguments */ Tcl_Obj *const objv[]) /* argument objects */ { int result; ItclObjectInfo *infoPtr = (ItclObjectInfo*)clientData; ItclShowArgs(1, "Itcl_BiKeepComponentOptionCmd", objc, objv); if (!infoPtr->itclHullCmdsInitted) { |
︙ | ︙ | |||
3734 3735 3736 3737 3738 3739 3740 | * * ------------------------------------------------------------------------ */ static int Itcl_BiIgnoreComponentOptionCmd( void *clientData, /* info for all known objects */ Tcl_Interp *interp, /* current interpreter */ | | | 3734 3735 3736 3737 3738 3739 3740 3741 3742 3743 3744 3745 3746 3747 3748 | * * ------------------------------------------------------------------------ */ static int Itcl_BiIgnoreComponentOptionCmd( void *clientData, /* info for all known objects */ Tcl_Interp *interp, /* current interpreter */ ItclSizeT objc, /* number of arguments */ Tcl_Obj *const objv[]) /* argument objects */ { Tcl_HashEntry *hPtr; Tcl_HashEntry *hPtr2; Tcl_Obj *objPtr; ItclClass *iclsPtr; ItclObject *ioPtr; |
︙ | ︙ |
Changes to generic/itclClass.c.
︙ | ︙ | |||
445 446 447 448 449 450 451 | /* * Add the built-in "this" command to the list of function members. */ Tcl_DStringInit(&buffer); Tcl_DStringAppend(&buffer, Tcl_GetString(iclsPtr->fullNamePtr), -1); Tcl_DStringAppend(&buffer, "::this", -1); | | | 445 446 447 448 449 450 451 452 453 454 455 456 457 458 459 | /* * Add the built-in "this" command to the list of function members. */ Tcl_DStringInit(&buffer); Tcl_DStringAppend(&buffer, Tcl_GetString(iclsPtr->fullNamePtr), -1); Tcl_DStringAppend(&buffer, "::this", -1); iclsPtr->thisCmd = Tcl_CreateObjCommand2(interp, Tcl_DStringValue(&buffer), Itcl_ThisCmd, iclsPtr, NULL); /* * Add the built-in "type" variable to the list of data members. */ if (iclsPtr->flags & ITCL_TYPE) { namePtr = Tcl_NewStringObj("type", -1); |
︙ | ︙ | |||
1403 1404 1405 1406 1407 1408 1409 | * by a unique string built from the class name. * ------------------------------------------------------------------------ */ int Itcl_HandleClass( void *clientData, /* class definition */ Tcl_Interp *interp, /* current interpreter */ | | | 1403 1404 1405 1406 1407 1408 1409 1410 1411 1412 1413 1414 1415 1416 1417 | * by a unique string built from the class name. * ------------------------------------------------------------------------ */ int Itcl_HandleClass( void *clientData, /* class definition */ Tcl_Interp *interp, /* current interpreter */ ItclSizeT objc, /* number of arguments */ Tcl_Obj *const objv[]) /* argument objects */ { if (objc > 3) { const char *token = Tcl_GetString(objv[3]); const char *nsEnd = NULL; const char *pos = token; const char *tail = pos; |
︙ | ︙ | |||
1460 1461 1462 1463 1464 1465 1466 | return ItclClassCreateObject(clientData, interp, objc, objv); } int ItclClassCreateObject( void *clientData, /* IclObjectInfo */ Tcl_Interp *interp, /* current interpreter */ | | | 1460 1461 1462 1463 1464 1465 1466 1467 1468 1469 1470 1471 1472 1473 1474 | return ItclClassCreateObject(clientData, interp, objc, objv); } int ItclClassCreateObject( void *clientData, /* IclObjectInfo */ Tcl_Interp *interp, /* current interpreter */ ItclSizeT objc, /* number of arguments */ Tcl_Obj *const objv[]) /* argument objects */ { Tcl_DString buffer; /* buffer used to build object names */ Tcl_Obj *objNamePtr; Tcl_HashEntry *hPtr; Tcl_Obj **newObjv; ItclClass *iclsPtr; |
︙ | ︙ |
Changes to generic/itclCmd.c.
︙ | ︙ | |||
43 44 45 46 47 48 49 | * ------------------------------------------------------------------------ */ static int NRThisCmd( void *clientData, /* class info */ Tcl_Interp *interp, /* current interpreter */ | | | | 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 | * ------------------------------------------------------------------------ */ static int NRThisCmd( void *clientData, /* class info */ Tcl_Interp *interp, /* current interpreter */ ItclSizeT objc, /* number of arguments */ Tcl_Obj *const objv[]) /* argument objects */ { void *clientData2; Tcl_Object oPtr; ItclClass *iclsPtr; ItclShowArgs(1, "NRThisCmd", objc, objv); iclsPtr = (ItclClass *)clientData; clientData2 = Itcl_GetCallFrameClientData(interp); oPtr = Tcl_ObjectContextObject((Tcl_ObjectContext)clientData2); return Itcl_PublicObjectCmd(oPtr, interp, iclsPtr->clsPtr, objc, objv); } int Itcl_ThisCmd( void *clientData, Tcl_Interp *interp, ItclSizeT objc, Tcl_Obj *const *objv) { FOREACH_HASH_DECLS; void *clientData2; Tcl_Object oPtr; Tcl_Obj **newObjv; ItclClass *iclsPtr; |
︙ | ︙ | |||
145 146 147 148 149 150 151 | } } if (hPtr == NULL) { Tcl_AppendResult(interp, "class \"", iclsPtr->nsPtr->fullName, "\" has no method: \"", Tcl_GetString(objv[1]), "\"", NULL); return TCL_ERROR; } | | | 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 | } } if (hPtr == NULL) { Tcl_AppendResult(interp, "class \"", iclsPtr->nsPtr->fullName, "\" has no method: \"", Tcl_GetString(objv[1]), "\"", NULL); return TCL_ERROR; } return Tcl_NRCallObjProc2(interp, NRThisCmd, clientData, objc, objv); } /* * ------------------------------------------------------------------------ * Itcl_FindClassesCmd() * |
︙ | ︙ | |||
167 168 169 170 171 172 173 | * ------------------------------------------------------------------------ */ int Itcl_FindClassesCmd( TCL_UNUSED(void *), /* class/object info */ Tcl_Interp *interp, /* current interpreter */ | | | 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 | * ------------------------------------------------------------------------ */ int Itcl_FindClassesCmd( TCL_UNUSED(void *), /* class/object info */ Tcl_Interp *interp, /* current interpreter */ ItclSizeT objc, /* number of arguments */ Tcl_Obj *const objv[]) /* argument objects */ { Tcl_Namespace *activeNs = Tcl_GetCurrentNamespace(interp); Tcl_Namespace *globalNs = Tcl_GetGlobalNamespace(interp); Tcl_HashTable unique; Tcl_HashEntry *hPtr; Tcl_HashSearch place; |
︙ | ︙ | |||
300 301 302 303 304 305 306 | * Returns TCL_OK/TCL_ERROR to indicate success/failure. * ------------------------------------------------------------------------ */ int Itcl_FindObjectsCmd( TCL_UNUSED(void *), /* class/object info */ Tcl_Interp *interp, /* current interpreter */ | | | 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 | * Returns TCL_OK/TCL_ERROR to indicate success/failure. * ------------------------------------------------------------------------ */ int Itcl_FindObjectsCmd( TCL_UNUSED(void *), /* class/object info */ Tcl_Interp *interp, /* current interpreter */ ItclSizeT objc, /* number of arguments */ Tcl_Obj *const objv[]) /* argument objects */ { Tcl_Namespace *activeNs = Tcl_GetCurrentNamespace(interp); Tcl_Namespace *globalNs = Tcl_GetGlobalNamespace(interp); int forceFullNames = 0; char *pattern = NULL; |
︙ | ︙ | |||
499 500 501 502 503 504 505 | * ------------------------------------------------------------------------ */ static int NRDelClassCmd( TCL_UNUSED(void *), /* unused */ Tcl_Interp *interp, /* current interpreter */ | | | 499 500 501 502 503 504 505 506 507 508 509 510 511 512 513 | * ------------------------------------------------------------------------ */ static int NRDelClassCmd( TCL_UNUSED(void *), /* unused */ Tcl_Interp *interp, /* current interpreter */ ItclSizeT objc, /* number of arguments */ Tcl_Obj *const objv[]) /* argument objects */ { int i; char *name; ItclClass *iclsPtr; ItclShowArgs(1, "Itcl_DelClassCmd", objc, objv); |
︙ | ︙ | |||
542 543 544 545 546 547 548 | } int Itcl_DelClassCmd( void *clientData, Tcl_Interp *interp, | | | | 542 543 544 545 546 547 548 549 550 551 552 553 554 555 556 557 558 559 | } int Itcl_DelClassCmd( void *clientData, Tcl_Interp *interp, ItclSizeT objc, Tcl_Obj *const *objv) { return Tcl_NRCallObjProc2(interp, NRDelClassCmd, clientData, objc, objv); } /* * ------------------------------------------------------------------------ * Itcl_DelObjectCmd() * |
︙ | ︙ | |||
584 585 586 587 588 589 590 | return result; } static int NRDelObjectCmd( TCL_UNUSED(void *), /* object management info */ Tcl_Interp *interp, /* current interpreter */ | | | 584 585 586 587 588 589 590 591 592 593 594 595 596 597 598 | return result; } static int NRDelObjectCmd( TCL_UNUSED(void *), /* object management info */ Tcl_Interp *interp, /* current interpreter */ ItclSizeT objc, /* number of arguments */ Tcl_Obj *const objv[]) /* argument objects */ { ItclObject *contextIoPtr; char *name; void *callbackPtr; int i; int result; |
︙ | ︙ | |||
629 630 631 632 633 634 635 | } int Itcl_DelObjectCmd( void *clientData, Tcl_Interp *interp, | | | | 629 630 631 632 633 634 635 636 637 638 639 640 641 642 643 644 645 646 | } int Itcl_DelObjectCmd( void *clientData, Tcl_Interp *interp, ItclSizeT objc, Tcl_Obj *const *objv) { return Tcl_NRCallObjProc2(interp, NRDelObjectCmd, clientData, objc, objv); } /* * ------------------------------------------------------------------------ * Itcl_ScopeCmd() * |
︙ | ︙ | |||
666 667 668 669 670 671 672 | * ------------------------------------------------------------------------ */ int Itcl_ScopeCmd( TCL_UNUSED(void *), /* unused */ Tcl_Interp *interp, /* current interpreter */ | | | 666 667 668 669 670 671 672 673 674 675 676 677 678 679 680 | * ------------------------------------------------------------------------ */ int Itcl_ScopeCmd( TCL_UNUSED(void *), /* unused */ Tcl_Interp *interp, /* current interpreter */ ItclSizeT objc, /* number of arguments */ Tcl_Obj *const objv[]) /* argument objects */ { Tcl_Namespace *contextNsPtr; Tcl_HashEntry *hPtr; Tcl_Object oPtr; Tcl_Obj *objPtr2; Tcl_Var var; |
︙ | ︙ | |||
894 895 896 897 898 899 900 | * ------------------------------------------------------------------------ */ int Itcl_CodeCmd( TCL_UNUSED(void *), /* unused */ Tcl_Interp *interp, /* current interpreter */ | | | 894 895 896 897 898 899 900 901 902 903 904 905 906 907 908 | * ------------------------------------------------------------------------ */ int Itcl_CodeCmd( TCL_UNUSED(void *), /* unused */ Tcl_Interp *interp, /* current interpreter */ ItclSizeT objc, /* number of arguments */ Tcl_Obj *const objv[]) /* argument objects */ { Tcl_Namespace *contextNs = Tcl_GetCurrentNamespace(interp); Tcl_Obj *listPtr; Tcl_Obj *objPtr; const char *token; |
︙ | ︙ | |||
995 996 997 998 999 1000 1001 | * Returns 1 if it is an object, 0 otherwise * ------------------------------------------------------------------------ */ int Itcl_IsObjectCmd( TCL_UNUSED(void *), /* class/object info */ Tcl_Interp *interp, /* current interpreter */ | | | 995 996 997 998 999 1000 1001 1002 1003 1004 1005 1006 1007 1008 1009 | * Returns 1 if it is an object, 0 otherwise * ------------------------------------------------------------------------ */ int Itcl_IsObjectCmd( TCL_UNUSED(void *), /* class/object info */ Tcl_Interp *interp, /* current interpreter */ ItclSizeT objc, /* number of arguments */ Tcl_Obj *const objv[]) /* argument objects */ { int classFlag = 0; int idx = 0; char *name = NULL; char *cname; |
︙ | ︙ | |||
1113 1114 1115 1116 1117 1118 1119 | * Returns 1 if it is a class, 0 otherwise * ------------------------------------------------------------------------ */ int Itcl_IsClassCmd( TCL_UNUSED(void *), /* class/object info */ Tcl_Interp *interp, /* current interpreter */ | | | 1113 1114 1115 1116 1117 1118 1119 1120 1121 1122 1123 1124 1125 1126 1127 | * Returns 1 if it is a class, 0 otherwise * ------------------------------------------------------------------------ */ int Itcl_IsClassCmd( TCL_UNUSED(void *), /* class/object info */ Tcl_Interp *interp, /* current interpreter */ ItclSizeT objc, /* number of arguments */ Tcl_Obj *const objv[]) /* argument objects */ { char *cname; char *name; ItclClass *iclsPtr = NULL; Tcl_Namespace *contextNs = NULL; |
︙ | ︙ | |||
1174 1175 1176 1177 1178 1179 1180 | * ------------------------------------------------------------------------ */ int Itcl_FilterAddCmd( TCL_UNUSED(void *), /* unused */ Tcl_Interp *interp, /* current interpreter */ | | | 1174 1175 1176 1177 1178 1179 1180 1181 1182 1183 1184 1185 1186 1187 1188 | * ------------------------------------------------------------------------ */ int Itcl_FilterAddCmd( TCL_UNUSED(void *), /* unused */ Tcl_Interp *interp, /* current interpreter */ ItclSizeT objc, /* number of arguments */ Tcl_Obj *const objv[]) /* argument objects */ { Tcl_Obj **newObjv; int result; ItclShowArgs(1, "Itcl_FilterCmd", objc, objv); /* Tcl_Namespace *contextNs = Tcl_GetCurrentNamespace(interp); */ |
︙ | ︙ | |||
1216 1217 1218 1219 1220 1221 1222 | * ------------------------------------------------------------------------ */ int Itcl_FilterDeleteCmd( TCL_UNUSED(void *), /* unused */ Tcl_Interp *interp, /* current interpreter */ | | | 1216 1217 1218 1219 1220 1221 1222 1223 1224 1225 1226 1227 1228 1229 1230 | * ------------------------------------------------------------------------ */ int Itcl_FilterDeleteCmd( TCL_UNUSED(void *), /* unused */ Tcl_Interp *interp, /* current interpreter */ ItclSizeT objc, /* number of arguments */ Tcl_Obj *const objv[]) /* argument objects */ { ItclShowArgs(1, "Itcl_FilterDeleteCmd", objc, objv); /* Tcl_Namespace *contextNs = Tcl_GetCurrentNamespace(interp); */ Tcl_AppendResult(interp, "::itcl::filter delete command not yet implemented", NULL); return TCL_ERROR; |
︙ | ︙ | |||
1241 1242 1243 1244 1245 1246 1247 | * ------------------------------------------------------------------------ */ int Itcl_ForwardAddCmd( TCL_UNUSED(void *), /* unused */ Tcl_Interp *interp, /* current interpreter */ | | | 1241 1242 1243 1244 1245 1246 1247 1248 1249 1250 1251 1252 1253 1254 1255 | * ------------------------------------------------------------------------ */ int Itcl_ForwardAddCmd( TCL_UNUSED(void *), /* unused */ Tcl_Interp *interp, /* current interpreter */ ItclSizeT objc, /* number of arguments */ Tcl_Obj *const objv[]) /* argument objects */ { Tcl_Obj *prefixObj; Tcl_Method mPtr; ItclObjectInfo *infoPtr; ItclClass *iclsPtr; |
︙ | ︙ | |||
1289 1290 1291 1292 1293 1294 1295 | * ------------------------------------------------------------------------ */ int Itcl_ForwardDeleteCmd( TCL_UNUSED(void *), /* unused */ Tcl_Interp *interp, /* current interpreter */ | | | 1289 1290 1291 1292 1293 1294 1295 1296 1297 1298 1299 1300 1301 1302 1303 | * ------------------------------------------------------------------------ */ int Itcl_ForwardDeleteCmd( TCL_UNUSED(void *), /* unused */ Tcl_Interp *interp, /* current interpreter */ ItclSizeT objc, /* number of arguments */ Tcl_Obj *const objv[]) /* argument objects */ { ItclShowArgs(1, "Itcl_ForwardDeleteCmd", objc, objv); /* Tcl_Namespace *contextNs = Tcl_GetCurrentNamespace(interp); */ Tcl_AppendResult(interp, "::itcl::forward delete command not yet implemented", NULL); return TCL_ERROR; |
︙ | ︙ | |||
1313 1314 1315 1316 1317 1318 1319 | * ------------------------------------------------------------------------ */ int Itcl_MixinAddCmd( TCL_UNUSED(void *), /* unused */ Tcl_Interp *interp, /* current interpreter */ | | | 1313 1314 1315 1316 1317 1318 1319 1320 1321 1322 1323 1324 1325 1326 1327 | * ------------------------------------------------------------------------ */ int Itcl_MixinAddCmd( TCL_UNUSED(void *), /* unused */ Tcl_Interp *interp, /* current interpreter */ ItclSizeT objc, /* number of arguments */ Tcl_Obj *const objv[]) /* argument objects */ { Tcl_Obj **newObjv; int result; ItclShowArgs(1, "Itcl_MixinAddCmd", objc, objv); if (objc < 3) { |
︙ | ︙ | |||
1353 1354 1355 1356 1357 1358 1359 | * ------------------------------------------------------------------------ */ int Itcl_MixinDeleteCmd( TCL_UNUSED(void *), /* unused */ Tcl_Interp *interp, /* current interpreter */ | | | 1353 1354 1355 1356 1357 1358 1359 1360 1361 1362 1363 1364 1365 1366 1367 | * ------------------------------------------------------------------------ */ int Itcl_MixinDeleteCmd( TCL_UNUSED(void *), /* unused */ Tcl_Interp *interp, /* current interpreter */ ItclSizeT objc, /* number of arguments */ Tcl_Obj *const objv[]) /* argument objects */ { ItclShowArgs(1, "Itcl_MixinDeleteCmd", objc, objv); /* Tcl_Namespace *contextNs = Tcl_GetCurrentNamespace(interp); */ Tcl_AppendResult(interp, "::itcl::mixin delete command not yet implemented", NULL); return TCL_ERROR; |
︙ | ︙ | |||
1377 1378 1379 1380 1381 1382 1383 | * ------------------------------------------------------------------------ */ int Itcl_NWidgetCmd( void *clientData, /* infoPtr */ Tcl_Interp *interp, /* current interpreter */ | | | 1377 1378 1379 1380 1381 1382 1383 1384 1385 1386 1387 1388 1389 1390 1391 | * ------------------------------------------------------------------------ */ int Itcl_NWidgetCmd( void *clientData, /* infoPtr */ Tcl_Interp *interp, /* current interpreter */ ItclSizeT objc, /* number of arguments */ Tcl_Obj *const objv[]) /* argument objects */ { ItclClass *iclsPtr; int result; iclsPtr = NULL; ItclShowArgs(0, "Itcl_NWidgetCmd", objc-1, objv); |
︙ | ︙ | |||
1413 1414 1415 1416 1417 1418 1419 | * ------------------------------------------------------------------------ */ int Itcl_AddOptionCmd( void *clientData, /* infoPtr */ Tcl_Interp *interp, /* current interpreter */ | | | 1413 1414 1415 1416 1417 1418 1419 1420 1421 1422 1423 1424 1425 1426 1427 | * ------------------------------------------------------------------------ */ int Itcl_AddOptionCmd( void *clientData, /* infoPtr */ Tcl_Interp *interp, /* current interpreter */ ItclSizeT objc, /* number of arguments */ Tcl_Obj *const objv[]) /* argument objects */ { Tcl_HashEntry *hPtr; ItclObjectInfo *infoPtr; ItclClass *iclsPtr; const char *protectionStr; int pLevel; |
︙ | ︙ | |||
1488 1489 1490 1491 1492 1493 1494 | * ------------------------------------------------------------------------ */ int Itcl_AddObjectOptionCmd( void *clientData, /* infoPtr */ Tcl_Interp *interp, /* current interpreter */ | | | 1488 1489 1490 1491 1492 1493 1494 1495 1496 1497 1498 1499 1500 1501 1502 | * ------------------------------------------------------------------------ */ int Itcl_AddObjectOptionCmd( void *clientData, /* infoPtr */ Tcl_Interp *interp, /* current interpreter */ ItclSizeT objc, /* number of arguments */ Tcl_Obj *const objv[]) /* argument objects */ { Tcl_HashEntry *hPtr; Tcl_Command cmd; Tcl_Obj *objPtr; ItclObjectInfo *infoPtr; ItclObject *ioPtr; |
︙ | ︙ | |||
1576 1577 1578 1579 1580 1581 1582 | * ------------------------------------------------------------------------ */ int Itcl_AddDelegatedOptionCmd( void *clientData, /* infoPtr */ Tcl_Interp *interp, /* current interpreter */ | | | 1576 1577 1578 1579 1580 1581 1582 1583 1584 1585 1586 1587 1588 1589 1590 | * ------------------------------------------------------------------------ */ int Itcl_AddDelegatedOptionCmd( void *clientData, /* infoPtr */ Tcl_Interp *interp, /* current interpreter */ ItclSizeT objc, /* number of arguments */ Tcl_Obj *const objv[]) /* argument objects */ { Tcl_HashEntry *hPtr; Tcl_Command cmd; ItclObjectInfo *infoPtr; ItclObject *ioPtr; ItclDelegatedOption *idoPtr; |
︙ | ︙ | |||
1636 1637 1638 1639 1640 1641 1642 | * ------------------------------------------------------------------------ */ int Itcl_AddDelegatedFunctionCmd( void *clientData, /* infoPtr */ Tcl_Interp *interp, /* current interpreter */ | | | 1636 1637 1638 1639 1640 1641 1642 1643 1644 1645 1646 1647 1648 1649 1650 | * ------------------------------------------------------------------------ */ int Itcl_AddDelegatedFunctionCmd( void *clientData, /* infoPtr */ Tcl_Interp *interp, /* current interpreter */ ItclSizeT objc, /* number of arguments */ Tcl_Obj *const objv[]) /* argument objects */ { Tcl_HashEntry *hPtr; Tcl_Command cmd; Tcl_Obj *componentNamePtr; ItclObjectInfo *infoPtr; ItclObject *ioPtr; |
︙ | ︙ | |||
1714 1715 1716 1717 1718 1719 1720 | * ------------------------------------------------------------------------ */ int Itcl_AddComponentCmd( TCL_UNUSED(void *), /* infoPtr */ Tcl_Interp *interp, /* current interpreter */ | | | 1714 1715 1716 1717 1718 1719 1720 1721 1722 1723 1724 1725 1726 1727 1728 | * ------------------------------------------------------------------------ */ int Itcl_AddComponentCmd( TCL_UNUSED(void *), /* infoPtr */ Tcl_Interp *interp, /* current interpreter */ ItclSizeT objc, /* number of arguments */ Tcl_Obj *const objv[]) /* argument objects */ { Tcl_HashEntry *hPtr; Tcl_DString buffer; Tcl_DString buffer2; Tcl_Namespace *varNsPtr; Tcl_Namespace *nsPtr; |
︙ | ︙ | |||
1878 1879 1880 1881 1882 1883 1884 | * ------------------------------------------------------------------------ */ int Itcl_SetComponentCmd( TCL_UNUSED(void *), /* infoPtr */ Tcl_Interp *interp, /* current interpreter */ | | | 1878 1879 1880 1881 1882 1883 1884 1885 1886 1887 1888 1889 1890 1891 1892 | * ------------------------------------------------------------------------ */ int Itcl_SetComponentCmd( TCL_UNUSED(void *), /* infoPtr */ Tcl_Interp *interp, /* current interpreter */ ItclSizeT objc, /* number of arguments */ Tcl_Obj *const objv[]) /* argument objects */ { FOREACH_HASH_DECLS; ItclClass *iclsPtr; ItclObject *contextIoPtr; ItclClass *contextIclsPtr; ItclComponent *icPtr; |
︙ | ︙ | |||
1964 1965 1966 1967 1968 1969 1970 | * ------------------------------------------------------------------------ */ int Itcl_ExtendedClassCmd( void *clientData, /* infoPtr */ Tcl_Interp *interp, /* current interpreter */ | | | 1964 1965 1966 1967 1968 1969 1970 1971 1972 1973 1974 1975 1976 1977 1978 | * ------------------------------------------------------------------------ */ int Itcl_ExtendedClassCmd( void *clientData, /* infoPtr */ Tcl_Interp *interp, /* current interpreter */ ItclSizeT objc, /* number of arguments */ Tcl_Obj *const objv[]) /* argument objects */ { ItclClass *iclsPtr; int result; ItclShowArgs(1, "Itcl_ExtendedClassCmd", objc-1, objv); result = ItclClassBaseCmd(clientData, interp, ITCL_ECLASS, objc, objv, |
︙ | ︙ | |||
1997 1998 1999 2000 2001 2002 2003 | * ------------------------------------------------------------------------ */ int Itcl_TypeClassCmd( void *clientData, /* infoPtr */ Tcl_Interp *interp, /* current interpreter */ | | | 1997 1998 1999 2000 2001 2002 2003 2004 2005 2006 2007 2008 2009 2010 2011 | * ------------------------------------------------------------------------ */ int Itcl_TypeClassCmd( void *clientData, /* infoPtr */ Tcl_Interp *interp, /* current interpreter */ ItclSizeT objc, /* number of arguments */ Tcl_Obj *const objv[]) /* argument objects */ { Tcl_Obj *objPtr; ItclClass *iclsPtr; int result; ItclShowArgs(1, "Itcl_TypeClassCmd", objc-1, objv); |
︙ | ︙ | |||
2040 2041 2042 2043 2044 2045 2046 | * ------------------------------------------------------------------------ */ int Itcl_ClassHullTypeCmd( void *clientData, /* infoPtr */ Tcl_Interp *interp, /* current interpreter */ | | | 2040 2041 2042 2043 2044 2045 2046 2047 2048 2049 2050 2051 2052 2053 2054 | * ------------------------------------------------------------------------ */ int Itcl_ClassHullTypeCmd( void *clientData, /* infoPtr */ Tcl_Interp *interp, /* current interpreter */ ItclSizeT objc, /* number of arguments */ Tcl_Obj *const objv[]) /* argument objects */ { ItclClass *iclsPtr; ItclObjectInfo *infoPtr; const char *hullTypeName; int correctArg; |
︙ | ︙ | |||
2125 2126 2127 2128 2129 2130 2131 | * ------------------------------------------------------------------------ */ int Itcl_ClassWidgetClassCmd( void *clientData, /* infoPtr */ Tcl_Interp *interp, /* current interpreter */ | | | 2125 2126 2127 2128 2129 2130 2131 2132 2133 2134 2135 2136 2137 2138 2139 | * ------------------------------------------------------------------------ */ int Itcl_ClassWidgetClassCmd( void *clientData, /* infoPtr */ Tcl_Interp *interp, /* current interpreter */ ItclSizeT objc, /* number of arguments */ Tcl_Obj *const objv[]) /* argument objects */ { ItclClass *iclsPtr; ItclObjectInfo *infoPtr; const char *widgetClassName; infoPtr = (ItclObjectInfo *)clientData; |
︙ | ︙ |
Changes to generic/itclDecls.h.
︙ | ︙ | |||
11 12 13 14 15 16 17 18 19 20 21 | Tcl_Interp *, const char *version, int exact); #else #define Itcl_InitStubs(interp, version, exact) Tcl_PkgRequireEx(interp,"itcl",version,exact,NULL) #endif /* !BEGIN!: Do not edit below this line. */ #define ITCL_STUBS_EPOCH 0 | > > > | | | | < | | | | | | < | | < | < | < | | > > > > > > > > > > | | | | | | | | | | | | | | | > > | 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 | Tcl_Interp *, const char *version, int exact); #else #define Itcl_InitStubs(interp, version, exact) Tcl_PkgRequireEx(interp,"itcl",version,exact,NULL) #endif #if TCL_MAJOR_VERSION < 9 # define Tcl_ObjCmdProc2 Tcl_ObjCmdProc #endif /* !BEGIN!: Do not edit below this line. */ #define ITCL_STUBS_EPOCH 0 #define ITCL_STUBS_REVISION 155 #ifdef __cplusplus extern "C" { #endif /* * Exported function declarations: */ /* Slot 0 is reserved */ /* Slot 1 is reserved */ /* 2 */ ITCLAPI int Itcl_RegisterC(Tcl_Interp *interp, const char *name, Tcl_CmdProc *proc, void *clientData, Tcl_CmdDeleteProc *deleteProc); /* 3 */ ITCLAPI int Itcl_RegisterObjC(Tcl_Interp *interp, const char *name, Tcl_ObjCmdProc *proc, void *clientData, Tcl_CmdDeleteProc *deleteProc); /* 4 */ ITCLAPI int Itcl_FindC(Tcl_Interp *interp, const char *name, Tcl_CmdProc **argProcPtr, Tcl_ObjCmdProc **objProcPtr, void **cDataPtr); /* 5 */ ITCLAPI void Itcl_InitStack(Itcl_Stack *stack); /* 6 */ ITCLAPI void Itcl_DeleteStack(Itcl_Stack *stack); /* 7 */ ITCLAPI void Itcl_PushStack(void *cdata, Itcl_Stack *stack); /* 8 */ ITCLAPI void * Itcl_PopStack(Itcl_Stack *stack); /* 9 */ ITCLAPI void * Itcl_PeekStack(Itcl_Stack *stack); /* 10 */ ITCLAPI void * Itcl_GetStackValue(Itcl_Stack *stack, int pos); /* 11 */ ITCLAPI void Itcl_InitList(Itcl_List *listPtr); /* 12 */ ITCLAPI void Itcl_DeleteList(Itcl_List *listPtr); /* 13 */ ITCLAPI Itcl_ListElem * Itcl_CreateListElem(Itcl_List *listPtr); /* 14 */ ITCLAPI Itcl_ListElem * Itcl_DeleteListElem(Itcl_ListElem *elemPtr); /* 15 */ ITCLAPI Itcl_ListElem * Itcl_InsertList(Itcl_List *listPtr, void *val); /* 16 */ ITCLAPI Itcl_ListElem * Itcl_InsertListElem(Itcl_ListElem *pos, void *val); /* 17 */ ITCLAPI Itcl_ListElem * Itcl_AppendList(Itcl_List *listPtr, void *val); /* 18 */ ITCLAPI Itcl_ListElem * Itcl_AppendListElem(Itcl_ListElem *pos, void *val); /* 19 */ ITCLAPI void Itcl_SetListValue(Itcl_ListElem *elemPtr, void *val); /* 20 */ ITCLAPI void Itcl_EventuallyFree(void *cdata, Tcl_FreeProc *fproc); /* 21 */ ITCLAPI void Itcl_PreserveData(void *cdata); /* 22 */ ITCLAPI void Itcl_ReleaseData(void *cdata); /* 23 */ ITCLAPI Itcl_InterpState Itcl_SaveInterpState(Tcl_Interp *interp, int status); /* 24 */ ITCLAPI int Itcl_RestoreInterpState(Tcl_Interp *interp, Itcl_InterpState state); /* 25 */ ITCLAPI void Itcl_DiscardInterpState(Itcl_InterpState state); /* 26 */ ITCLAPI void * Itcl_Alloc(size_t size); /* 27 */ ITCLAPI void Itcl_Free(void *ptr); /* 28 */ ITCLAPI void * ItclGetStackValue(Itcl_Stack *stack, size_t pos); /* 29 */ ITCLAPI int Itcl_RegisterObjC2(Tcl_Interp *interp, const char *name, Tcl_ObjCmdProc2 *proc, void *clientData, Tcl_CmdDeleteProc *deleteProc); /* 30 */ ITCLAPI int Itcl_FindC2(Tcl_Interp *interp, const char *name, Tcl_CmdProc **argProcPtr, Tcl_ObjCmdProc2 **objProcPtr, void **cDataPtr); typedef struct { const struct ItclIntStubs *itclIntStubs; } ItclStubHooks; typedef struct ItclStubs { int magic; int epoch; int revision; const ItclStubHooks *hooks; void (*reserved0)(void); void (*reserved1)(void); int (*itcl_RegisterC) (Tcl_Interp *interp, const char *name, Tcl_CmdProc *proc, void *clientData, Tcl_CmdDeleteProc *deleteProc); /* 2 */ int (*itcl_RegisterObjC) (Tcl_Interp *interp, const char *name, Tcl_ObjCmdProc *proc, void *clientData, Tcl_CmdDeleteProc *deleteProc); /* 3 */ int (*itcl_FindC) (Tcl_Interp *interp, const char *name, Tcl_CmdProc **argProcPtr, Tcl_ObjCmdProc **objProcPtr, void **cDataPtr); /* 4 */ void (*itcl_InitStack) (Itcl_Stack *stack); /* 5 */ void (*itcl_DeleteStack) (Itcl_Stack *stack); /* 6 */ void (*itcl_PushStack) (void *cdata, Itcl_Stack *stack); /* 7 */ void * (*itcl_PopStack) (Itcl_Stack *stack); /* 8 */ void * (*itcl_PeekStack) (Itcl_Stack *stack); /* 9 */ void * (*itcl_GetStackValue) (Itcl_Stack *stack, int pos); /* 10 */ void (*itcl_InitList) (Itcl_List *listPtr); /* 11 */ void (*itcl_DeleteList) (Itcl_List *listPtr); /* 12 */ Itcl_ListElem * (*itcl_CreateListElem) (Itcl_List *listPtr); /* 13 */ Itcl_ListElem * (*itcl_DeleteListElem) (Itcl_ListElem *elemPtr); /* 14 */ Itcl_ListElem * (*itcl_InsertList) (Itcl_List *listPtr, void *val); /* 15 */ Itcl_ListElem * (*itcl_InsertListElem) (Itcl_ListElem *pos, void *val); /* 16 */ Itcl_ListElem * (*itcl_AppendList) (Itcl_List *listPtr, void *val); /* 17 */ Itcl_ListElem * (*itcl_AppendListElem) (Itcl_ListElem *pos, void *val); /* 18 */ void (*itcl_SetListValue) (Itcl_ListElem *elemPtr, void *val); /* 19 */ void (*itcl_EventuallyFree) (void *cdata, Tcl_FreeProc *fproc); /* 20 */ void (*itcl_PreserveData) (void *cdata); /* 21 */ void (*itcl_ReleaseData) (void *cdata); /* 22 */ Itcl_InterpState (*itcl_SaveInterpState) (Tcl_Interp *interp, int status); /* 23 */ int (*itcl_RestoreInterpState) (Tcl_Interp *interp, Itcl_InterpState state); /* 24 */ void (*itcl_DiscardInterpState) (Itcl_InterpState state); /* 25 */ void * (*itcl_Alloc) (size_t size); /* 26 */ void (*itcl_Free) (void *ptr); /* 27 */ void * (*itclGetStackValue) (Itcl_Stack *stack, size_t pos); /* 28 */ int (*itcl_RegisterObjC2) (Tcl_Interp *interp, const char *name, Tcl_ObjCmdProc2 *proc, void *clientData, Tcl_CmdDeleteProc *deleteProc); /* 29 */ int (*itcl_FindC2) (Tcl_Interp *interp, const char *name, Tcl_CmdProc **argProcPtr, Tcl_ObjCmdProc2 **objProcPtr, void **cDataPtr); /* 30 */ } ItclStubs; extern const ItclStubs *itclStubsPtr; #ifdef __cplusplus } #endif |
︙ | ︙ | |||
204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 | (itclStubsPtr->itcl_DiscardInterpState) /* 25 */ #define Itcl_Alloc \ (itclStubsPtr->itcl_Alloc) /* 26 */ #define Itcl_Free \ (itclStubsPtr->itcl_Free) /* 27 */ #define ItclGetStackValue \ (itclStubsPtr->itclGetStackValue) /* 28 */ #endif /* defined(USE_ITCL_STUBS) */ /* !END!: Do not edit above this line. */ #if TCL_MAJOR_VERSION > 8 # undef Itcl_GetStackValue # define Itcl_GetStackValue ItclGetStackValue #endif #endif /* _ITCLDECLS */ | > > > > | 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 | (itclStubsPtr->itcl_DiscardInterpState) /* 25 */ #define Itcl_Alloc \ (itclStubsPtr->itcl_Alloc) /* 26 */ #define Itcl_Free \ (itclStubsPtr->itcl_Free) /* 27 */ #define ItclGetStackValue \ (itclStubsPtr->itclGetStackValue) /* 28 */ #define Itcl_RegisterObjC2 \ (itclStubsPtr->itcl_RegisterObjC2) /* 29 */ #define Itcl_FindC2 \ (itclStubsPtr->itcl_FindC2) /* 30 */ #endif /* defined(USE_ITCL_STUBS) */ /* !END!: Do not edit above this line. */ #if TCL_MAJOR_VERSION > 8 # undef Itcl_GetStackValue # define Itcl_GetStackValue ItclGetStackValue #endif #endif /* _ITCLDECLS */ |
Changes to generic/itclEnsemble.c.
︙ | ︙ | |||
42 43 44 45 46 47 48 | typedef struct EnsemblePart { char *name; /* name of this part */ Tcl_Obj *namePtr; Tcl_Command cmdPtr; /* command handling this part */ char *usage; /* usage string describing syntax */ struct Ensemble* ensemble; /* ensemble containing this part */ ItclArgList *arglistPtr; /* the parsed argument list */ | | | 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 | typedef struct EnsemblePart { char *name; /* name of this part */ Tcl_Obj *namePtr; Tcl_Command cmdPtr; /* command handling this part */ char *usage; /* usage string describing syntax */ struct Ensemble* ensemble; /* ensemble containing this part */ ItclArgList *arglistPtr; /* the parsed argument list */ Tcl_ObjCmdProc2 *objProc; /* handling procedure for part */ void *clientData; /* the procPtr for the part */ Tcl_CmdDeleteProc *deleteProc; /* procedure used to destroy client data */ int minChars; /* chars needed to uniquely identify part */ int flags; Tcl_Interp *interp; Tcl_Obj *mapNamePtr; |
︙ | ︙ | |||
84 85 86 87 88 89 90 | typedef struct EnsembleParser { Tcl_Interp* interp; /* interpreter containing ensembles */ Tcl_Interp* parser; /* child interp for parsing */ Ensemble* ensData; /* add parts to this ensemble */ } EnsembleParser; static int EnsembleSubCmd(void *clientData, Tcl_Interp *interp, | | | | | 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 | typedef struct EnsembleParser { Tcl_Interp* interp; /* interpreter containing ensembles */ Tcl_Interp* parser; /* child interp for parsing */ Ensemble* ensData; /* add parts to this ensemble */ } EnsembleParser; static int EnsembleSubCmd(void *clientData, Tcl_Interp *interp, ItclSizeT objc, Tcl_Obj *const objv[]); static int EnsembleUnknownCmd(void *dummy, Tcl_Interp *interp, ItclSizeT objc, Tcl_Obj *const objv[]); /* * Forward declarations for the procedures used in this file. */ static void GetEnsembleUsage (Tcl_Interp *interp, Ensemble *ensData, Tcl_Obj *objPtr); static void GetEnsemblePartUsage (Tcl_Interp *interp, Ensemble *ensData, EnsemblePart *ensPart, Tcl_Obj *objPtr); static int CreateEnsemble (Tcl_Interp *interp, Ensemble *parentEnsData, const char *ensName); static int AddEnsemblePart (Tcl_Interp *interp, Ensemble* ensData, const char* partName, const char* usageInfo, Tcl_ObjCmdProc2 *objProc, void *clientData, Tcl_CmdDeleteProc *deleteProc, int flags, EnsemblePart **rVal); static int FindEnsemble (Tcl_Interp *interp, const char **nameArgv, ItclSizeT nameArgc, Ensemble** ensDataPtr); static int CreateEnsemblePart (Tcl_Interp *interp, Ensemble *ensData, const char* partName, EnsemblePart **ensPartPtr); static void DeleteEnsemblePart (void *clientData); static int FindEnsemblePart (Tcl_Interp *interp, |
︙ | ︙ | |||
144 145 146 147 148 149 150 | Itcl_EnsembleInit( Tcl_Interp *interp) /* interpreter being initialized */ { Tcl_DString buffer; ItclObjectInfo *infoPtr; infoPtr = (ItclObjectInfo *)Tcl_GetAssocData(interp, ITCL_INTERP_DATA, NULL); | | | | 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 | Itcl_EnsembleInit( Tcl_Interp *interp) /* interpreter being initialized */ { Tcl_DString buffer; ItclObjectInfo *infoPtr; infoPtr = (ItclObjectInfo *)Tcl_GetAssocData(interp, ITCL_INTERP_DATA, NULL); Tcl_CreateObjCommand2(interp, "::itcl::ensemble", Itcl_EnsembleCmd, NULL, NULL); Tcl_DStringInit(&buffer); Tcl_DStringAppend(&buffer, ITCL_COMMANDS_NAMESPACE, -1); Tcl_DStringAppend(&buffer, "::ensembles", -1); infoPtr->ensembleInfo->ensembleNsPtr = Tcl_CreateNamespace(interp, Tcl_DStringValue(&buffer), NULL, NULL); Tcl_DStringFree(&buffer); if (infoPtr->ensembleInfo->ensembleNsPtr == NULL) { Tcl_AppendResult(interp, "error in creating namespace: ", Tcl_DStringValue(&buffer), NULL); return TCL_ERROR; } Tcl_CreateObjCommand2(interp, ITCL_COMMANDS_NAMESPACE "::ensembles::unknown", EnsembleUnknownCmd, NULL, NULL); return TCL_OK; } /* |
︙ | ︙ | |||
301 302 303 304 305 306 307 | */ int Itcl_AddEnsemblePart( Tcl_Interp *interp, /* interpreter to be updated */ const char* ensName, /* ensemble containing this part */ const char* partName, /* name of the new part */ const char* usageInfo, /* usage info for argument list */ | | | 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 | */ int Itcl_AddEnsemblePart( Tcl_Interp *interp, /* interpreter to be updated */ const char* ensName, /* ensemble containing this part */ const char* partName, /* name of the new part */ const char* usageInfo, /* usage info for argument list */ Tcl_ObjCmdProc2 *objProc, /* handling procedure for part */ void *clientData, /* client data associated with part */ Tcl_CmdDeleteProc *deleteProc) /* procedure used to destroy client data */ { const char **nameArgv = NULL; ItclSizeT nameArgc; Ensemble *ensData; EnsemblePart *ensPart; |
︙ | ︙ | |||
577 578 579 580 581 582 583 584 585 586 587 588 589 590 | if (chainObj) { cmd = Tcl_GetCommandFromObj(interp, chainObj); if (Tcl_GetCommandInfoFromToken(cmd, &infoPtr) != 1) { return 0; } if (infoPtr.deleteProc == DeleteEnsemble) { ensData = (Ensemble*)infoPtr.objClientData; GetEnsembleUsage(interp, ensData, objPtr); return 1; } } return 0; } | > > > > > | 577 578 579 580 581 582 583 584 585 586 587 588 589 590 591 592 593 594 595 | if (chainObj) { cmd = Tcl_GetCommandFromObj(interp, chainObj); if (Tcl_GetCommandInfoFromToken(cmd, &infoPtr) != 1) { return 0; } if (infoPtr.deleteProc == DeleteEnsemble) { #if TCL_MAJOR_VERSION > 8 if (infoPtr.isNativeObjectProc == 2) { ensData = (Ensemble*)infoPtr.objClientData2; } else #endif ensData = (Ensemble*)infoPtr.objClientData; GetEnsembleUsage(interp, ensData, objPtr); return 1; } } return 0; } |
︙ | ︙ | |||
917 918 919 920 921 922 923 | */ static int AddEnsemblePart( Tcl_Interp *interp, /* interpreter to be updated */ Ensemble* ensData, /* ensemble that will contain this part */ const char* partName, /* name of the new part */ const char* usageInfo, /* usage info for argument list */ | | | 922 923 924 925 926 927 928 929 930 931 932 933 934 935 936 | */ static int AddEnsemblePart( Tcl_Interp *interp, /* interpreter to be updated */ Ensemble* ensData, /* ensemble that will contain this part */ const char* partName, /* name of the new part */ const char* usageInfo, /* usage info for argument list */ Tcl_ObjCmdProc2 *objProc, /* handling procedure for part */ void *clientData, /* client data associated with part */ Tcl_CmdDeleteProc *deleteProc, /* procedure used to destroy client data */ int flags, EnsemblePart **rVal) /* returns: new ensemble part */ { Tcl_Obj *mapDict; Tcl_Command cmd; |
︙ | ︙ | |||
955 956 957 958 959 960 961 | } ensPart->mapNamePtr = Tcl_NewStringObj(ensData->nsPtr->fullName, -1); Tcl_AppendToObj(ensPart->mapNamePtr, "::", 2); Tcl_AppendToObj(ensPart->mapNamePtr, partName, -1); Tcl_IncrRefCount(ensPart->namePtr); Tcl_IncrRefCount(ensPart->mapNamePtr); Tcl_DictObjPut(NULL, mapDict, ensPart->namePtr, ensPart->mapNamePtr); | | | 960 961 962 963 964 965 966 967 968 969 970 971 972 973 974 | } ensPart->mapNamePtr = Tcl_NewStringObj(ensData->nsPtr->fullName, -1); Tcl_AppendToObj(ensPart->mapNamePtr, "::", 2); Tcl_AppendToObj(ensPart->mapNamePtr, partName, -1); Tcl_IncrRefCount(ensPart->namePtr); Tcl_IncrRefCount(ensPart->mapNamePtr); Tcl_DictObjPut(NULL, mapDict, ensPart->namePtr, ensPart->mapNamePtr); cmd = Tcl_CreateObjCommand2(interp, Tcl_GetString(ensPart->mapNamePtr), EnsembleSubCmd, ensPart, DeleteEnsemblePart); if (cmd == NULL) { Tcl_DictObjRemove(NULL, mapDict, ensPart->namePtr); Tcl_DecrRefCount(ensPart->namePtr); Tcl_DecrRefCount(ensPart->mapNamePtr); return TCL_ERROR; } |
︙ | ︙ | |||
1126 1127 1128 1129 1130 1131 1132 1133 1134 1135 1136 1137 1138 1139 | "part \"", nameArgv[i], "\" is not an ensemble", NULL); return TCL_ERROR; } if (Tcl_GetCommandInfoFromToken(cmdPtr, &cmdInfo) != 1) { return TCL_ERROR; } ensData = (Ensemble*)cmdInfo.objClientData; } *ensDataPtr = ensData; return TCL_OK; } | > > > > > | 1131 1132 1133 1134 1135 1136 1137 1138 1139 1140 1141 1142 1143 1144 1145 1146 1147 1148 1149 | "part \"", nameArgv[i], "\" is not an ensemble", NULL); return TCL_ERROR; } if (Tcl_GetCommandInfoFromToken(cmdPtr, &cmdInfo) != 1) { return TCL_ERROR; } #if TCL_MAJOR_VERSION > 8 if (cmdInfo.isNativeObjectProc == 2) { ensData = (Ensemble*)cmdInfo.objClientData2; } else #endif ensData = (Ensemble*)cmdInfo.objClientData; } *ensDataPtr = ensData; return TCL_OK; } |
︙ | ︙ | |||
1628 1629 1630 1631 1632 1633 1634 | * *---------------------------------------------------------------------- */ int Itcl_EnsembleCmd( void *clientData, /* ensemble data */ Tcl_Interp *interp, /* current interpreter */ | | | 1638 1639 1640 1641 1642 1643 1644 1645 1646 1647 1648 1649 1650 1651 1652 | * *---------------------------------------------------------------------- */ int Itcl_EnsembleCmd( void *clientData, /* ensemble data */ Tcl_Interp *interp, /* current interpreter */ ItclSizeT objc, /* number of arguments */ Tcl_Obj *const objv[]) /* argument objects */ { int status; char *ensName; EnsembleParser *ensInfo; Ensemble *ensData; Ensemble *savedEnsData; |
︙ | ︙ | |||
1837 1838 1839 1840 1841 1842 1843 | ensInfo->ensData = NULL; Tcl_DeleteNamespace(Tcl_GetGlobalNamespace(ensInfo->parser)); /* * Add the allowed commands to the parser interpreter: * part, delete, ensemble */ | | | | | 1847 1848 1849 1850 1851 1852 1853 1854 1855 1856 1857 1858 1859 1860 1861 1862 1863 1864 1865 1866 1867 | ensInfo->ensData = NULL; Tcl_DeleteNamespace(Tcl_GetGlobalNamespace(ensInfo->parser)); /* * Add the allowed commands to the parser interpreter: * part, delete, ensemble */ Tcl_CreateObjCommand2(ensInfo->parser, "part", Itcl_EnsPartCmd, ensInfo, NULL); Tcl_CreateObjCommand2(ensInfo->parser, "option", Itcl_EnsPartCmd, ensInfo, NULL); Tcl_CreateObjCommand2(ensInfo->parser, "ensemble", Itcl_EnsembleCmd, ensInfo, NULL); /* * Install the parser data, so we'll have it the next time * we call this procedure. */ (void) Tcl_SetAssocData(interp, "itcl_ensembleParser", |
︙ | ︙ | |||
1920 1921 1922 1923 1924 1925 1926 | * *---------------------------------------------------------------------- */ int Itcl_EnsPartCmd( void *clientData, /* ensemble data */ Tcl_Interp *interp, /* current interpreter */ | | | 1930 1931 1932 1933 1934 1935 1936 1937 1938 1939 1940 1941 1942 1943 1944 | * *---------------------------------------------------------------------- */ int Itcl_EnsPartCmd( void *clientData, /* ensemble data */ Tcl_Interp *interp, /* current interpreter */ ItclSizeT objc, /* number of arguments */ Tcl_Obj *const objv[]) /* argument objects */ { Tcl_Obj *usagePtr; Tcl_Proc procPtr; EnsembleParser *ensInfo = (EnsembleParser*)clientData; Ensemble *ensData = (Ensemble*)ensInfo->ensData; EnsemblePart *ensPart; |
︙ | ︙ | |||
1979 1980 1981 1982 1983 1984 1985 | /* * Create a new part within the ensemble. If successful, * plug the command token into the proc; we'll need it later * if we try to compile the Tcl code for the part. If * anything goes wrong, clean up before bailing out. */ result = AddEnsemblePart(ensInfo->interp, ensData, partName, usage, | | | 1989 1990 1991 1992 1993 1994 1995 1996 1997 1998 1999 2000 2001 2002 2003 | /* * Create a new part within the ensemble. If successful, * plug the command token into the proc; we'll need it later * if we try to compile the Tcl code for the part. If * anything goes wrong, clean up before bailing out. */ result = AddEnsemblePart(ensInfo->interp, ensData, partName, usage, (Tcl_ObjCmdProc2 *)Tcl_GetObjInterpProc(), procPtr, _Tcl_ProcDeleteProc, ITCL_ENSEMBLE_ENSEMBLE, &ensPart); if (result == TCL_ERROR) { _Tcl_ProcDeleteProc(procPtr); } Tcl_TransferResult(ensInfo->interp, result, interp); errorOut: |
︙ | ︙ | |||
2057 2058 2059 2060 2061 2062 2063 | CallInvokeEnsembleMethod( void *data[], Tcl_Interp *interp, int result) { Tcl_Namespace *nsPtr = (Tcl_Namespace *)data[0]; EnsemblePart *ensPart = (EnsemblePart *)data[1]; | | | | | 2067 2068 2069 2070 2071 2072 2073 2074 2075 2076 2077 2078 2079 2080 2081 2082 2083 2084 2085 2086 2087 2088 2089 2090 2091 2092 2093 2094 2095 2096 2097 2098 2099 2100 2101 2102 2103 2104 2105 2106 | CallInvokeEnsembleMethod( void *data[], Tcl_Interp *interp, int result) { Tcl_Namespace *nsPtr = (Tcl_Namespace *)data[0]; EnsemblePart *ensPart = (EnsemblePart *)data[1]; ItclSizeT objc = PTR2INT(data[2]); Tcl_Obj *const *objv = (Tcl_Obj *const *)data[3]; result = Itcl_InvokeEnsembleMethod(interp, nsPtr, ensPart->namePtr, (Tcl_Proc *)ensPart->clientData, objc, objv); return result; } static int CallInvokeEnsembleMethod2( void *data[], Tcl_Interp *interp, int result) { EnsemblePart *ensPart = (EnsemblePart *)data[0]; ItclSizeT objc = PTR2INT(data[1]); Tcl_Obj *const*objv = (Tcl_Obj *const*)data[2]; result = (*ensPart->objProc)(ensPart->clientData, interp, objc, objv); return result; } static int EnsembleSubCmd( void *clientData, /* ensPart struct pointer */ Tcl_Interp *interp, /* Current interpreter. */ ItclSizeT objc, /* Number of arguments. */ Tcl_Obj *const objv[]) /* Argument objects. */ { int result; Tcl_Namespace *nsPtr; EnsemblePart *ensPart; void *callbackPtr; |
︙ | ︙ | |||
2119 2120 2121 2122 2123 2124 2125 | * ------------------------------------------------------------------------ */ static int EnsembleUnknownCmd( TCL_UNUSED(void *), /* not used */ Tcl_Interp *interp, /* current interpreter */ | | | 2129 2130 2131 2132 2133 2134 2135 2136 2137 2138 2139 2140 2141 2142 2143 | * ------------------------------------------------------------------------ */ static int EnsembleUnknownCmd( TCL_UNUSED(void *), /* not used */ Tcl_Interp *interp, /* current interpreter */ ItclSizeT objc, /* number of arguments */ Tcl_Obj *const objv[]) /* argument objects */ { Tcl_Command cmd; Tcl_HashEntry *hPtr; ItclObjectInfo *infoPtr; EnsemblePart *ensPart; Ensemble *ensData; |
︙ | ︙ | |||
2181 2182 2183 2184 2185 2186 2187 | * Invoked when the user tries to delet an ensemble *---------------------------------------------------------------------- */ int Itcl_EnsembleDeleteCmd( void *clientData, /* infoPtr */ Tcl_Interp *interp, /* current interpreter */ | | | 2191 2192 2193 2194 2195 2196 2197 2198 2199 2200 2201 2202 2203 2204 2205 | * Invoked when the user tries to delet an ensemble *---------------------------------------------------------------------- */ int Itcl_EnsembleDeleteCmd( void *clientData, /* infoPtr */ Tcl_Interp *interp, /* current interpreter */ ItclSizeT objc, /* number of arguments */ Tcl_Obj *const objv[]) /* argument objects */ { Tcl_HashEntry *hPtr; Tcl_Command cmdPtr; Ensemble *ensData; ItclObjectInfo *infoPtr; int i; |
︙ | ︙ |
Changes to generic/itclHelpers.c.
︙ | ︙ | |||
22 23 24 25 26 27 28 | * ------------------------------------------------------------------------ */ void ItclShowArgs( int level, const char *str, | | | | 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 | * ------------------------------------------------------------------------ */ void ItclShowArgs( int level, const char *str, ItclSizeT objc, Tcl_Obj * const* objv) { ItclSizeT i; if (level > _itcl_debug_level) { return; } fprintf(stderr, "%s", str); for (i = 0; i < objc; i++) { fprintf(stderr, "!%s", objv[i] == NULL ? "??" : |
︙ | ︙ | |||
270 271 272 273 274 275 276 277 278 279 280 281 282 283 | } /* * Finally, invoke the command's Tcl_ObjCmdProc. Be careful * to pass in the proper client data. */ Tcl_GetCommandInfoFromToken(cmd, &infoPtr); return infoPtr.objProc(infoPtr.objClientData, interp, objc, objv); } /* * ------------------------------------------------------------------------ * Itcl_CreateArgs() | > > > > > | 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 | } /* * Finally, invoke the command's Tcl_ObjCmdProc. Be careful * to pass in the proper client data. */ Tcl_GetCommandInfoFromToken(cmd, &infoPtr); #if TCL_MAJOR_VERSION > 8 if (infoPtr.isNativeObjectProc == 2) { return infoPtr.objProc2(infoPtr.objClientData2, interp, objc, objv); } #endif return infoPtr.objProc(infoPtr.objClientData, interp, objc, objv); } /* * ------------------------------------------------------------------------ * Itcl_CreateArgs() |
︙ | ︙ | |||
322 323 324 325 326 327 328 | */ int ItclEnsembleSubCmd( TCL_UNUSED(void *), Tcl_Interp *interp, TCL_UNUSED(const char *), | | | 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 | */ int ItclEnsembleSubCmd( TCL_UNUSED(void *), Tcl_Interp *interp, TCL_UNUSED(const char *), ItclSizeT objc, Tcl_Obj *const *objv, TCL_UNUSED(const char *)) { int result; Tcl_Obj **newObjv; int isRootEnsemble; |
︙ | ︙ |
Changes to generic/itclInfo.c.
︙ | ︙ | |||
27 28 29 30 31 32 33 | * Copyright (c) 1993-1998 Lucent Technologies, Inc. * ------------------------------------------------------------------------ * See the file "license.terms" for information on usage and redistribution * of this file, and for a DISCLAIMER OF ALL WARRANTIES. */ #include "itclInt.h" | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 | * Copyright (c) 1993-1998 Lucent Technologies, Inc. * ------------------------------------------------------------------------ * See the file "license.terms" for information on usage and redistribution * of this file, and for a DISCLAIMER OF ALL WARRANTIES. */ #include "itclInt.h" static Tcl_ObjCmdProc2 Itcl_BiInfoClassOptionsCmd; static Tcl_ObjCmdProc2 Itcl_BiInfoComponentsCmd; static Tcl_ObjCmdProc2 Itcl_BiInfoDefaultCmd; static Tcl_ObjCmdProc2 Itcl_BiInfoDelegatedCmd; static Tcl_ObjCmdProc2 Itcl_BiInfoExtendedClassCmd; static Tcl_ObjCmdProc2 Itcl_BiInfoInstancesCmd; static Tcl_ObjCmdProc2 Itcl_BiInfoHullTypeCmd; static Tcl_ObjCmdProc2 Itcl_BiInfoMethodCmd; static Tcl_ObjCmdProc2 Itcl_BiInfoMethodsCmd; static Tcl_ObjCmdProc2 Itcl_BiInfoOptionsCmd; static Tcl_ObjCmdProc2 Itcl_BiInfoTypeCmd; static Tcl_ObjCmdProc2 Itcl_BiInfoTypeMethodCmd; static Tcl_ObjCmdProc2 Itcl_BiInfoTypeMethodsCmd; static Tcl_ObjCmdProc2 Itcl_BiInfoTypesCmd; static Tcl_ObjCmdProc2 Itcl_BiInfoTypeVarsCmd; static Tcl_ObjCmdProc2 Itcl_BiInfoTypeVariableCmd; static Tcl_ObjCmdProc2 Itcl_BiInfoVariablesCmd; static Tcl_ObjCmdProc2 Itcl_BiInfoWidgetadaptorCmd; static Tcl_ObjCmdProc2 Itcl_BiInfoWidgetCmd; static Tcl_ObjCmdProc2 Itcl_BiInfoDelegatedOptionsCmd; static Tcl_ObjCmdProc2 Itcl_BiInfoDelegatedMethodsCmd; static Tcl_ObjCmdProc2 Itcl_BiInfoDelegatedTypeMethodsCmd; static Tcl_ObjCmdProc2 Itcl_BiInfoDelegatedOptionCmd; static Tcl_ObjCmdProc2 Itcl_BiInfoDelegatedMethodCmd; static Tcl_ObjCmdProc2 Itcl_BiInfoDelegatedTypeMethodCmd; static Tcl_ObjCmdProc2 Itcl_BiInfoDelegatedUnknownCmd; static Tcl_ObjCmdProc2 Itcl_BiInfoContextCmd; typedef struct InfoMethod { const char* name; /* method name */ const char* usage; /* string describing usage */ Tcl_ObjCmdProc2 *proc; /* implementation C proc */ int flags; /* which class commands have it */ } InfoMethod; static const InfoMethod InfoMethodList[] = { { "args", "procname", Itcl_BiInfoArgsCmd, |
︙ | ︙ | |||
246 247 248 249 250 251 252 | 0 } }; struct NameProcMap2 { const char* name; /* method name */ const char* usage; /* string describing usage */ | | | 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 | 0 } }; struct NameProcMap2 { const char* name; /* method name */ const char* usage; /* string describing usage */ Tcl_ObjCmdProc2 *proc; /* implementation C proc */ int flags; /* which class commands have it */ }; static const struct NameProcMap2 infoCmdsDelegated2[] = { { "::itcl::builtin::Info::delegated::methods", "?pattern?", Itcl_BiInfoDelegatedMethodsCmd, |
︙ | ︙ | |||
342 343 344 345 346 347 348 | return result; } int ItclInfoGuts( ItclObject *ioPtr, Tcl_Interp *interp, | | | 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 | return result; } int ItclInfoGuts( ItclObject *ioPtr, Tcl_Interp *interp, ItclSizeT objc, Tcl_Obj *const objv[]) { ItclObjectInfo *infoPtr = ioPtr->infoPtr; Tcl_CmdInfo info; ItclCallContext *cPtr; Tcl_CallFrame *framePtr; Tcl_HashEntry *hPtr; |
︙ | ︙ | |||
388 389 390 391 392 393 394 395 396 397 398 399 400 401 402 | cPtr->imPtr = NULL; cPtr->refCount = 1; Itcl_PushStack(cPtr, stackPtr); Tcl_NRAddCallback(interp, InfoGutsFinish, framePtr, infoPtr, cPtr, NULL); Tcl_GetCommandInfoFromToken(infoPtr->infoCmd, &info); return Tcl_NRCallObjProc(interp, info.objProc, info.objClientData, objc-1, objv+1); } static int NRInfoWrap( void *clientData, Tcl_Interp *interp, | > > > > > > | | 388 389 390 391 392 393 394 395 396 397 398 399 400 401 402 403 404 405 406 407 408 409 410 411 412 413 414 415 416 | cPtr->imPtr = NULL; cPtr->refCount = 1; Itcl_PushStack(cPtr, stackPtr); Tcl_NRAddCallback(interp, InfoGutsFinish, framePtr, infoPtr, cPtr, NULL); Tcl_GetCommandInfoFromToken(infoPtr->infoCmd, &info); #if TCL_MAJOR_VERSION > 8 if (info.isNativeObjectProc == 2) { return Tcl_NRCallObjProc2(interp, info.objProc2, info.objClientData2, objc-1, objv+1); } #endif return Tcl_NRCallObjProc(interp, info.objProc, info.objClientData, objc-1, objv+1); } static int NRInfoWrap( void *clientData, Tcl_Interp *interp, ItclSizeT objc, Tcl_Obj *const objv[]) { Tcl_CmdInfo info; ItclObjectInfo *infoPtr = (ItclObjectInfo *)clientData; if (!infoPtr->infoCmd) { Tcl_SetObjResult(interp, Tcl_NewStringObj( |
︙ | ︙ | |||
424 425 426 427 428 429 430 431 432 433 434 435 436 437 438 | Tcl_SetObjResult(interp, objPtr); return TCL_ERROR; } /* Have a subcommand. Pass on to the ensemble */ Tcl_GetCommandInfoFromToken(infoPtr->infoCmd, &info); return Tcl_NRCallObjProc(interp, info.objProc, info.objClientData, objc, objv); } static int InfoWrap( void *clientData, Tcl_Interp *interp, | > > > > > > | | | 430 431 432 433 434 435 436 437 438 439 440 441 442 443 444 445 446 447 448 449 450 451 452 453 454 455 456 457 458 459 460 461 | Tcl_SetObjResult(interp, objPtr); return TCL_ERROR; } /* Have a subcommand. Pass on to the ensemble */ Tcl_GetCommandInfoFromToken(infoPtr->infoCmd, &info); #if TCL_MAJOR_VERSION > 8 if (info.isNativeObjectProc == 2) { return Tcl_NRCallObjProc2(interp, info.objProc2, info.objClientData2, objc, objv); } #endif return Tcl_NRCallObjProc(interp, info.objProc, info.objClientData, objc, objv); } static int InfoWrap( void *clientData, Tcl_Interp *interp, ItclSizeT objc, Tcl_Obj *const objv[]) { return Tcl_NRCallObjProc2(interp, NRInfoWrap, clientData, objc, objv); } static void InfoCmdDelete( void *clientData) { ItclObjectInfo *infoPtr = (ItclObjectInfo *)clientData; |
︙ | ︙ | |||
474 475 476 477 478 479 480 | } if (infoPtr->infoCmd) { Tcl_Panic("Double init of info ensemble"); } token = Tcl_CreateEnsemble(interp, nsPtr->fullName, nsPtr, TCL_ENSEMBLE_PREFIX); infoPtr->infoCmd = token; | | > > > > > > | | | 486 487 488 489 490 491 492 493 494 495 496 497 498 499 500 501 502 503 504 505 506 507 508 509 510 511 512 513 514 515 516 517 518 519 520 521 522 523 524 525 526 527 528 529 530 531 532 533 | } if (infoPtr->infoCmd) { Tcl_Panic("Double init of info ensemble"); } token = Tcl_CreateEnsemble(interp, nsPtr->fullName, nsPtr, TCL_ENSEMBLE_PREFIX); infoPtr->infoCmd = token; token = Tcl_NRCreateCommand2(interp, "::itcl::builtin::info", InfoWrap, NRInfoWrap, infoPtr, InfoCmdDelete); Tcl_GetCommandInfoFromToken(token, &info); /* * Make the C implementation of the "info" ensemble available as * a method body. This makes all [$object info] become the * equivalent of [::itcl::builtin::Info] without any need for * tailcall to restore the right frame [87a1bc6e82]. */ #if TCL_MAJOR_VERSION > 8 if (info.isNativeObjectProc == 2) { Itcl_RegisterObjC2(interp, "itcl-builtin-info", info.objProc2, info.objClientData2, NULL); } else #endif Itcl_RegisterObjC(interp, "itcl-builtin-info", info.objProc, info.objClientData, NULL); Tcl_Export(interp, nsPtr, "[a-z]*", 1); ensObjPtr = Tcl_NewStringObj("::itcl::builtin::Info", -1); for (i=0 ; InfoMethodList[i].name!=NULL ; i++) { Tcl_Obj *cmdObjPtr = Tcl_DuplicateObj(ensObjPtr); Tcl_AppendToObj(cmdObjPtr, "::", 2); Tcl_AppendToObj(cmdObjPtr, InfoMethodList[i].name, -1); Tcl_CreateObjCommand2(interp, Tcl_GetString(cmdObjPtr), InfoMethodList[i].proc, infoPtr, InfoMethodList[i].proc == Itcl_BiInfoVarsCmd ? ItclRestoreInfoVars : NULL); Tcl_DecrRefCount(cmdObjPtr); } unkObjPtr = Tcl_NewStringObj("::itcl::builtin::Info::unknown", -1); Tcl_CreateObjCommand2(interp, Tcl_GetString(unkObjPtr), Itcl_BiInfoUnknownCmd, infoPtr, NULL); if (Tcl_SetEnsembleUnknownHandler(NULL, Tcl_FindEnsemble(interp, ensObjPtr, TCL_LEAVE_ERR_MSG), unkObjPtr) != TCL_OK) { Tcl_DecrRefCount(unkObjPtr); Tcl_DecrRefCount(ensObjPtr); return TCL_ERROR; |
︙ | ︙ | |||
525 526 527 528 529 530 531 | if (nsPtr == NULL) { Tcl_Panic("ITCL: error in creating namespace: ::itcl::builtin::Info::delegated \n"); } Tcl_CreateEnsemble(interp, nsPtr->fullName, nsPtr, TCL_ENSEMBLE_PREFIX); Tcl_Export(interp, nsPtr, "[a-z]*", 1); for (i=0 ; infoCmdsDelegated2[i].name!=NULL ; i++) { | | | 543 544 545 546 547 548 549 550 551 552 553 554 555 556 557 | if (nsPtr == NULL) { Tcl_Panic("ITCL: error in creating namespace: ::itcl::builtin::Info::delegated \n"); } Tcl_CreateEnsemble(interp, nsPtr->fullName, nsPtr, TCL_ENSEMBLE_PREFIX); Tcl_Export(interp, nsPtr, "[a-z]*", 1); for (i=0 ; infoCmdsDelegated2[i].name!=NULL ; i++) { Tcl_CreateObjCommand2(interp, infoCmdsDelegated2[i].name, infoCmdsDelegated2[i].proc, infoPtr, NULL); } ensObjPtr = Tcl_NewStringObj("::itcl::builtin::Info::delegated", -1); unkObjPtr = Tcl_NewStringObj( "::itcl::builtin::Info::delegated::unknown", -1); result = TCL_OK; |
︙ | ︙ | |||
659 660 661 662 663 664 665 | * ------------------------------------------------------------------------ */ int Itcl_BiInfoClassCmd( TCL_UNUSED(void *), /* ItclObjectInfo Ptr */ Tcl_Interp *interp, /* current interpreter */ | | | 677 678 679 680 681 682 683 684 685 686 687 688 689 690 691 | * ------------------------------------------------------------------------ */ int Itcl_BiInfoClassCmd( TCL_UNUSED(void *), /* ItclObjectInfo Ptr */ Tcl_Interp *interp, /* current interpreter */ ItclSizeT objc, /* number of arguments */ Tcl_Obj *const objv[]) /* argument objects */ { Tcl_Namespace *contextNs = NULL; ItclClass *contextIclsPtr = NULL; ItclObject *contextIoPtr; char *name; |
︙ | ︙ | |||
739 740 741 742 743 744 745 | * ------------------------------------------------------------------------ */ static int Itcl_BiInfoClassOptionsCmd( TCL_UNUSED(void *), /* ItclObjectInfo Ptr */ Tcl_Interp *interp, /* current interpreter */ | | | 757 758 759 760 761 762 763 764 765 766 767 768 769 770 771 | * ------------------------------------------------------------------------ */ static int Itcl_BiInfoClassOptionsCmd( TCL_UNUSED(void *), /* ItclObjectInfo Ptr */ Tcl_Interp *interp, /* current interpreter */ ItclSizeT objc, /* number of arguments */ Tcl_Obj *const objv[]) /* argument objects */ { FOREACH_HASH_DECLS; Tcl_HashEntry *hPtr2; Tcl_Obj *listPtr; Tcl_Obj *listPtr2; Tcl_Obj *objPtr; |
︙ | ︙ | |||
850 851 852 853 854 855 856 | * ------------------------------------------------------------------------ */ static int Itcl_BiInfoContextCmd( TCL_UNUSED(void *), /* ItclObjectInfo Ptr */ Tcl_Interp *interp, /* current interpreter */ | | | 868 869 870 871 872 873 874 875 876 877 878 879 880 881 882 | * ------------------------------------------------------------------------ */ static int Itcl_BiInfoContextCmd( TCL_UNUSED(void *), /* ItclObjectInfo Ptr */ Tcl_Interp *interp, /* current interpreter */ ItclSizeT objc, /* number of arguments */ Tcl_Obj *const objv[]) /* argument objects */ { Tcl_Obj *listPtr; Tcl_Obj *objPtr; ItclObject *ioPtr = NULL; ItclClass *iclsPtr; |
︙ | ︙ | |||
889 890 891 892 893 894 895 | * ------------------------------------------------------------------------ */ int Itcl_BiInfoInheritCmd( TCL_UNUSED(void *), /* ItclObjectInfo Ptr */ Tcl_Interp *interp, /* current interpreter */ | | | 907 908 909 910 911 912 913 914 915 916 917 918 919 920 921 | * ------------------------------------------------------------------------ */ int Itcl_BiInfoInheritCmd( TCL_UNUSED(void *), /* ItclObjectInfo Ptr */ Tcl_Interp *interp, /* current interpreter */ ItclSizeT objc, /* number of arguments */ Tcl_Obj *const objv[]) /* argument objects */ { ItclClass *contextIclsPtr = NULL; ItclObject *contextIoPtr = NULL; Itcl_ListElem *elem; Tcl_Obj *listPtr; |
︙ | ︙ | |||
949 950 951 952 953 954 955 | * ------------------------------------------------------------------------ */ int Itcl_BiInfoHeritageCmd( TCL_UNUSED(void *), /* ItclObjectInfo Ptr */ Tcl_Interp *interp, /* current interpreter */ | | | 967 968 969 970 971 972 973 974 975 976 977 978 979 980 981 | * ------------------------------------------------------------------------ */ int Itcl_BiInfoHeritageCmd( TCL_UNUSED(void *), /* ItclObjectInfo Ptr */ Tcl_Interp *interp, /* current interpreter */ ItclSizeT objc, /* number of arguments */ Tcl_Obj *const objv[]) /* argument objects */ { ItclClass *contextIclsPtr = NULL; ItclObject *contextIoPtr = NULL; ItclHierIter hier; Tcl_Obj *listPtr; Tcl_Obj *objPtr; |
︙ | ︙ | |||
1019 1020 1021 1022 1023 1024 1025 | * ------------------------------------------------------------------------ */ int Itcl_BiInfoFunctionCmd( TCL_UNUSED(void *), /* ItclObjectInfo Ptr */ Tcl_Interp *interp, /* current interpreter */ | | | 1037 1038 1039 1040 1041 1042 1043 1044 1045 1046 1047 1048 1049 1050 1051 | * ------------------------------------------------------------------------ */ int Itcl_BiInfoFunctionCmd( TCL_UNUSED(void *), /* ItclObjectInfo Ptr */ Tcl_Interp *interp, /* current interpreter */ ItclSizeT objc, /* number of arguments */ Tcl_Obj *const objv[]) /* argument objects */ { char *cmdName = NULL; Tcl_Obj *resultPtr = NULL; Tcl_Obj *objPtr = NULL; static const char *options[] = { |
︙ | ︙ | |||
1259 1260 1261 1262 1263 1264 1265 | */ /*&&&1*/ int Itcl_BiInfoVariableCmd( TCL_UNUSED(void *), /* ItclObjectInfo Ptr */ Tcl_Interp *interp, /* current interpreter */ | | | 1277 1278 1279 1280 1281 1282 1283 1284 1285 1286 1287 1288 1289 1290 1291 | */ /*&&&1*/ int Itcl_BiInfoVariableCmd( TCL_UNUSED(void *), /* ItclObjectInfo Ptr */ Tcl_Interp *interp, /* current interpreter */ ItclSizeT objc, /* number of arguments */ Tcl_Obj *const objv[]) /* argument objects */ { Tcl_Obj *resultPtr; Tcl_Obj *objPtr; Tcl_HashSearch place; Tcl_HashEntry *entry; ItclClass *iclsPtr; |
︙ | ︙ | |||
1603 1604 1605 1606 1607 1608 1609 | * ------------------------------------------------------------------------ */ int Itcl_BiInfoVarsCmd( void *clientData, /* ItclObjectInfo Ptr */ Tcl_Interp *interp, /* current interpreter */ | | | 1621 1622 1623 1624 1625 1626 1627 1628 1629 1630 1631 1632 1633 1634 1635 | * ------------------------------------------------------------------------ */ int Itcl_BiInfoVarsCmd( void *clientData, /* ItclObjectInfo Ptr */ Tcl_Interp *interp, /* current interpreter */ ItclSizeT objc, /* number of arguments */ Tcl_Obj *const objv[]) /* argument objects */ { FOREACH_HASH_DECLS; Tcl_Obj *listPtr; Tcl_Obj **newObjv; Tcl_Namespace *nsPtr; ItclObjectInfo *infoPtr; |
︙ | ︙ | |||
1743 1744 1745 1746 1747 1748 1749 | * ------------------------------------------------------------------------ */ int Itcl_BiInfoUnknownCmd( void *clientData, /* ItclObjectInfo Ptr */ Tcl_Interp *interp, /* current interpreter */ | | | 1761 1762 1763 1764 1765 1766 1767 1768 1769 1770 1771 1772 1773 1774 1775 | * ------------------------------------------------------------------------ */ int Itcl_BiInfoUnknownCmd( void *clientData, /* ItclObjectInfo Ptr */ Tcl_Interp *interp, /* current interpreter */ ItclSizeT objc, /* number of arguments */ Tcl_Obj *const objv[]) /* argument objects */ { Tcl_Obj *objPtr, *listObj; int usage = 1; int code = TCL_ERROR; ItclShowArgs(1, "Itcl_BiInfoUnknownCmd", objc, objv); |
︙ | ︙ | |||
1828 1829 1830 1831 1832 1833 1834 | * ------------------------------------------------------------------------ */ int Itcl_BiInfoBodyCmd( TCL_UNUSED(void *), /* ItclObjectInfo Ptr */ Tcl_Interp *interp, /* current interpreter */ | | | 1846 1847 1848 1849 1850 1851 1852 1853 1854 1855 1856 1857 1858 1859 1860 | * ------------------------------------------------------------------------ */ int Itcl_BiInfoBodyCmd( TCL_UNUSED(void *), /* ItclObjectInfo Ptr */ Tcl_Interp *interp, /* current interpreter */ ItclSizeT objc, /* number of arguments */ Tcl_Obj *const objv[]) /* argument objects */ { Tcl_HashEntry *hPtr; ItclClass *contextIclsPtr = NULL; ItclObject *contextIoPtr; const char *what = "procedure"; |
︙ | ︙ | |||
1931 1932 1933 1934 1935 1936 1937 | * ------------------------------------------------------------------------ */ int Itcl_BiInfoArgsCmd( TCL_UNUSED(void *), /* ItclObjectInfo Ptr */ Tcl_Interp *interp, /* current interpreter */ | | | 1949 1950 1951 1952 1953 1954 1955 1956 1957 1958 1959 1960 1961 1962 1963 | * ------------------------------------------------------------------------ */ int Itcl_BiInfoArgsCmd( TCL_UNUSED(void *), /* ItclObjectInfo Ptr */ Tcl_Interp *interp, /* current interpreter */ ItclSizeT objc, /* number of arguments */ Tcl_Obj *const objv[]) /* argument objects */ { Tcl_HashEntry *hPtr = NULL; ItclClass *contextIclsPtr = NULL; ItclObject *contextIoPtr; const char *what = NULL; |
︙ | ︙ | |||
2040 2041 2042 2043 2044 2045 2046 | * ------------------------------------------------------------------------ */ int Itcl_BiInfoOptionCmd( TCL_UNUSED(void *), /* ItclObjectInfo Ptr */ Tcl_Interp *interp, /* current interpreter */ | | | 2058 2059 2060 2061 2062 2063 2064 2065 2066 2067 2068 2069 2070 2071 2072 | * ------------------------------------------------------------------------ */ int Itcl_BiInfoOptionCmd( TCL_UNUSED(void *), /* ItclObjectInfo Ptr */ Tcl_Interp *interp, /* current interpreter */ ItclSizeT objc, /* number of arguments */ Tcl_Obj *const objv[]) /* argument objects */ { char *optionName = NULL; Tcl_Obj *resultPtr = NULL; Tcl_Obj *objPtr = NULL; Tcl_Obj *optionNamePtr; |
︙ | ︙ | |||
2343 2344 2345 2346 2347 2348 2349 | * ------------------------------------------------------------------------ */ int Itcl_BiInfoComponentCmd( TCL_UNUSED(void *), /* ItclObjectInfo Ptr */ Tcl_Interp *interp, /* current interpreter */ | | | 2361 2362 2363 2364 2365 2366 2367 2368 2369 2370 2371 2372 2373 2374 2375 | * ------------------------------------------------------------------------ */ int Itcl_BiInfoComponentCmd( TCL_UNUSED(void *), /* ItclObjectInfo Ptr */ Tcl_Interp *interp, /* current interpreter */ ItclSizeT objc, /* number of arguments */ Tcl_Obj *const objv[]) /* argument objects */ { char *componentName = NULL; Tcl_Obj *resultPtr = NULL; Tcl_Obj *objPtr = NULL; Tcl_Obj *componentNamePtr; |
︙ | ︙ | |||
2562 2563 2564 2565 2566 2567 2568 | * ------------------------------------------------------------------------ */ static int Itcl_BiInfoWidgetCmd( TCL_UNUSED(void *), /* ItclObjectInfo Ptr */ Tcl_Interp *interp, /* current interpreter */ | | | 2580 2581 2582 2583 2584 2585 2586 2587 2588 2589 2590 2591 2592 2593 2594 | * ------------------------------------------------------------------------ */ static int Itcl_BiInfoWidgetCmd( TCL_UNUSED(void *), /* ItclObjectInfo Ptr */ Tcl_Interp *interp, /* current interpreter */ ItclSizeT objc, /* number of arguments */ Tcl_Obj *const objv[]) /* argument objects */ { Tcl_Namespace *contextNs = NULL; Tcl_Obj *objPtr; ItclClass *contextIclsPtr; ItclObject *contextIoPtr; char *name; |
︙ | ︙ | |||
2654 2655 2656 2657 2658 2659 2660 | * ------------------------------------------------------------------------ */ static int Itcl_BiInfoExtendedClassCmd( TCL_UNUSED(void *), /* ItclObjectInfo Ptr */ Tcl_Interp *interp, /* current interpreter */ | | | 2672 2673 2674 2675 2676 2677 2678 2679 2680 2681 2682 2683 2684 2685 2686 | * ------------------------------------------------------------------------ */ static int Itcl_BiInfoExtendedClassCmd( TCL_UNUSED(void *), /* ItclObjectInfo Ptr */ Tcl_Interp *interp, /* current interpreter */ ItclSizeT objc, /* number of arguments */ Tcl_Obj *const objv[]) /* argument objects */ { #ifdef NOTYET static const char *components[] = { "-name", "-inherit", "-value", NULL }; enum BCompIdx { |
︙ | ︙ | |||
2741 2742 2743 2744 2745 2746 2747 | * ------------------------------------------------------------------------ */ static int Itcl_BiInfoDelegatedCmd( TCL_UNUSED(void *), /* ItclObjectInfo Ptr */ Tcl_Interp *interp, /* current interpreter */ | | | 2759 2760 2761 2762 2763 2764 2765 2766 2767 2768 2769 2770 2771 2772 2773 | * ------------------------------------------------------------------------ */ static int Itcl_BiInfoDelegatedCmd( TCL_UNUSED(void *), /* ItclObjectInfo Ptr */ Tcl_Interp *interp, /* current interpreter */ ItclSizeT objc, /* number of arguments */ Tcl_Obj *const objv[]) /* argument objects */ { #ifdef NOTYET static const char *components[] = { "-name", "-inherit", "-value", NULL }; enum BCompIdx { |
︙ | ︙ | |||
2826 2827 2828 2829 2830 2831 2832 | * ------------------------------------------------------------------------ */ static int Itcl_BiInfoTypeCmd( TCL_UNUSED(void *), /* ItclObjectInfo Ptr */ Tcl_Interp *interp, /* current interpreter */ | | | 2844 2845 2846 2847 2848 2849 2850 2851 2852 2853 2854 2855 2856 2857 2858 | * ------------------------------------------------------------------------ */ static int Itcl_BiInfoTypeCmd( TCL_UNUSED(void *), /* ItclObjectInfo Ptr */ Tcl_Interp *interp, /* current interpreter */ ItclSizeT objc, /* number of arguments */ Tcl_Obj *const objv[]) /* argument objects */ { Tcl_Namespace *contextNs = NULL; Tcl_Obj *objPtr; ItclClass *contextIclsPtr; ItclObject *contextIoPtr; char *name; |
︙ | ︙ | |||
2914 2915 2916 2917 2918 2919 2920 | * ------------------------------------------------------------------------ */ static int Itcl_BiInfoHullTypeCmd( TCL_UNUSED(void *), /* ItclObjectInfo Ptr */ Tcl_Interp *interp, /* current interpreter */ | | | 2932 2933 2934 2935 2936 2937 2938 2939 2940 2941 2942 2943 2944 2945 2946 | * ------------------------------------------------------------------------ */ static int Itcl_BiInfoHullTypeCmd( TCL_UNUSED(void *), /* ItclObjectInfo Ptr */ Tcl_Interp *interp, /* current interpreter */ ItclSizeT objc, /* number of arguments */ Tcl_Obj *const objv[]) /* argument objects */ { ItclClass *contextIclsPtr; ItclObject *contextIoPtr; ItclShowArgs(1, "Itcl_BiInfoHullTypeCmd", objc, objv); if (objc != 1) { |
︙ | ︙ | |||
2981 2982 2983 2984 2985 2986 2987 | * ------------------------------------------------------------------------ */ static int Itcl_BiInfoDefaultCmd( TCL_UNUSED(void *), /* ItclObjectInfo Ptr */ Tcl_Interp *interp, /* current interpreter */ | | | 2999 3000 3001 3002 3003 3004 3005 3006 3007 3008 3009 3010 3011 3012 3013 | * ------------------------------------------------------------------------ */ static int Itcl_BiInfoDefaultCmd( TCL_UNUSED(void *), /* ItclObjectInfo Ptr */ Tcl_Interp *interp, /* current interpreter */ ItclSizeT objc, /* number of arguments */ Tcl_Obj *const objv[]) /* argument objects */ { FOREACH_HASH_DECLS; ItclObject *ioPtr; ItclClass *iclsPtr; ItclMemberFunc *imPtr; ItclDelegatedFunction *idmPtr; |
︙ | ︙ | |||
3076 3077 3078 3079 3080 3081 3082 | * ------------------------------------------------------------------------ */ static int Itcl_BiInfoMethodCmd( TCL_UNUSED(void *), /* ItclObjectInfo Ptr */ Tcl_Interp *interp, /* current interpreter */ | | | 3094 3095 3096 3097 3098 3099 3100 3101 3102 3103 3104 3105 3106 3107 3108 | * ------------------------------------------------------------------------ */ static int Itcl_BiInfoMethodCmd( TCL_UNUSED(void *), /* ItclObjectInfo Ptr */ Tcl_Interp *interp, /* current interpreter */ ItclSizeT objc, /* number of arguments */ Tcl_Obj *const objv[]) /* argument objects */ { Tcl_Obj *resultPtr; Tcl_Obj *objPtr; Tcl_HashSearch place; Tcl_HashEntry *hPtr; ItclClass *contextIclsPtr; |
︙ | ︙ | |||
3303 3304 3305 3306 3307 3308 3309 | * ------------------------------------------------------------------------ */ static int Itcl_BiInfoMethodsCmd( TCL_UNUSED(void *), /* ItclObjectInfo Ptr */ Tcl_Interp *interp, /* current interpreter */ | | | 3321 3322 3323 3324 3325 3326 3327 3328 3329 3330 3331 3332 3333 3334 3335 | * ------------------------------------------------------------------------ */ static int Itcl_BiInfoMethodsCmd( TCL_UNUSED(void *), /* ItclObjectInfo Ptr */ Tcl_Interp *interp, /* current interpreter */ ItclSizeT objc, /* number of arguments */ Tcl_Obj *const objv[]) /* argument objects */ { FOREACH_HASH_DECLS; Tcl_Obj *listPtr; ItclObject *ioPtr; ItclClass *iclsPtr; ItclMemberFunc *imPtr; |
︙ | ︙ | |||
3401 3402 3403 3404 3405 3406 3407 | * ------------------------------------------------------------------------ */ static int Itcl_BiInfoOptionsCmd( TCL_UNUSED(void *), /* ItclObjectInfo Ptr */ Tcl_Interp *interp, /* current interpreter */ | | | 3419 3420 3421 3422 3423 3424 3425 3426 3427 3428 3429 3430 3431 3432 3433 | * ------------------------------------------------------------------------ */ static int Itcl_BiInfoOptionsCmd( TCL_UNUSED(void *), /* ItclObjectInfo Ptr */ Tcl_Interp *interp, /* current interpreter */ ItclSizeT objc, /* number of arguments */ Tcl_Obj *const objv[]) /* argument objects */ { FOREACH_HASH_DECLS; Tcl_HashEntry *hPtr2; Tcl_Obj *listPtr; Tcl_Obj *listPtr2; Tcl_Obj *objPtr; |
︙ | ︙ | |||
3521 3522 3523 3524 3525 3526 3527 | * ------------------------------------------------------------------------ */ static int Itcl_BiInfoTypesCmd( void *clientData, /* ItclObjectInfo Ptr */ Tcl_Interp *interp, /* current interpreter */ | | | 3539 3540 3541 3542 3543 3544 3545 3546 3547 3548 3549 3550 3551 3552 3553 | * ------------------------------------------------------------------------ */ static int Itcl_BiInfoTypesCmd( void *clientData, /* ItclObjectInfo Ptr */ Tcl_Interp *interp, /* current interpreter */ ItclSizeT objc, /* number of arguments */ Tcl_Obj *const objv[]) /* argument objects */ { FOREACH_HASH_DECLS; Tcl_Obj *listPtr; ItclObjectInfo *infoPtr; ItclClass *iclsPtr; const char *name; |
︙ | ︙ | |||
3574 3575 3576 3577 3578 3579 3580 | * ------------------------------------------------------------------------ */ static int Itcl_BiInfoComponentsCmd( TCL_UNUSED(void *), /* ItclObjectInfo Ptr */ Tcl_Interp *interp, /* current interpreter */ | | | 3592 3593 3594 3595 3596 3597 3598 3599 3600 3601 3602 3603 3604 3605 3606 | * ------------------------------------------------------------------------ */ static int Itcl_BiInfoComponentsCmd( TCL_UNUSED(void *), /* ItclObjectInfo Ptr */ Tcl_Interp *interp, /* current interpreter */ ItclSizeT objc, /* number of arguments */ Tcl_Obj *const objv[]) /* argument objects */ { FOREACH_HASH_DECLS; Tcl_Obj *listPtr; ItclObject *ioPtr; ItclClass *iclsPtr; ItclComponent *icPtr; |
︙ | ︙ | |||
3645 3646 3647 3648 3649 3650 3651 | * ------------------------------------------------------------------------ */ static int Itcl_BiInfoTypeMethodCmd( TCL_UNUSED(void *), /* ItclObjectInfo Ptr */ Tcl_Interp *interp, /* current interpreter */ | | | 3663 3664 3665 3666 3667 3668 3669 3670 3671 3672 3673 3674 3675 3676 3677 | * ------------------------------------------------------------------------ */ static int Itcl_BiInfoTypeMethodCmd( TCL_UNUSED(void *), /* ItclObjectInfo Ptr */ Tcl_Interp *interp, /* current interpreter */ ItclSizeT objc, /* number of arguments */ Tcl_Obj *const objv[]) /* argument objects */ { Tcl_Obj *resultPtr; Tcl_Obj *objPtr; Tcl_HashSearch place; Tcl_HashEntry *hPtr; ItclClass *contextIclsPtr; |
︙ | ︙ | |||
3873 3874 3875 3876 3877 3878 3879 | * ------------------------------------------------------------------------ */ static int Itcl_BiInfoTypeMethodsCmd( TCL_UNUSED(void *), /* ItclObjectInfo Ptr */ Tcl_Interp *interp, /* current interpreter */ | | | 3891 3892 3893 3894 3895 3896 3897 3898 3899 3900 3901 3902 3903 3904 3905 | * ------------------------------------------------------------------------ */ static int Itcl_BiInfoTypeMethodsCmd( TCL_UNUSED(void *), /* ItclObjectInfo Ptr */ Tcl_Interp *interp, /* current interpreter */ ItclSizeT objc, /* number of arguments */ Tcl_Obj *const objv[]) /* argument objects */ { FOREACH_HASH_DECLS; Tcl_Obj *listPtr; ItclObject *ioPtr; ItclClass *iclsPtr; ItclMemberFunc *imPtr; |
︙ | ︙ | |||
3978 3979 3980 3981 3982 3983 3984 | * ------------------------------------------------------------------------ */ static int Itcl_BiInfoTypeVarsCmd( TCL_UNUSED(void *), /* ItclObjectInfo Ptr */ Tcl_Interp *interp, /* current interpreter */ | | | 3996 3997 3998 3999 4000 4001 4002 4003 4004 4005 4006 4007 4008 4009 4010 | * ------------------------------------------------------------------------ */ static int Itcl_BiInfoTypeVarsCmd( TCL_UNUSED(void *), /* ItclObjectInfo Ptr */ Tcl_Interp *interp, /* current interpreter */ ItclSizeT objc, /* number of arguments */ Tcl_Obj *const objv[]) /* argument objects */ { FOREACH_HASH_DECLS; Tcl_Obj *listPtr; ItclObject *ioPtr; ItclClass *iclsPtr; ItclVariable *ivPtr; |
︙ | ︙ | |||
4035 4036 4037 4038 4039 4040 4041 | * ------------------------------------------------------------------------ */ static int Itcl_BiInfoTypeVariableCmd( TCL_UNUSED(void *), /* ItclObjectInfo Ptr */ Tcl_Interp *interp, /* current interpreter */ | | | 4053 4054 4055 4056 4057 4058 4059 4060 4061 4062 4063 4064 4065 4066 4067 | * ------------------------------------------------------------------------ */ static int Itcl_BiInfoTypeVariableCmd( TCL_UNUSED(void *), /* ItclObjectInfo Ptr */ Tcl_Interp *interp, /* current interpreter */ ItclSizeT objc, /* number of arguments */ Tcl_Obj *const objv[]) /* argument objects */ { Tcl_Obj *resultPtr; Tcl_Obj *objPtr; Tcl_HashSearch place; Tcl_HashEntry *hPtr; ItclClass *iclsPtr; |
︙ | ︙ | |||
4285 4286 4287 4288 4289 4290 4291 | * ------------------------------------------------------------------------ */ static int Itcl_BiInfoVariablesCmd( TCL_UNUSED(void *), /* ItclObjectInfo Ptr */ Tcl_Interp *interp, /* current interpreter */ | | | 4303 4304 4305 4306 4307 4308 4309 4310 4311 4312 4313 4314 4315 4316 4317 | * ------------------------------------------------------------------------ */ static int Itcl_BiInfoVariablesCmd( TCL_UNUSED(void *), /* ItclObjectInfo Ptr */ Tcl_Interp *interp, /* current interpreter */ ItclSizeT objc, /* number of arguments */ Tcl_Obj *const objv[]) /* argument objects */ { ItclShowArgs(1, "Itcl_BiInfoVariablesCmd", objc, objv); Tcl_AppendResult(interp, "Itcl_BiInfoVariablesCmd not yet implemented\n", NULL); return TCL_ERROR; } |
︙ | ︙ | |||
4310 4311 4312 4313 4314 4315 4316 | * ------------------------------------------------------------------------ */ static int Itcl_BiInfoWidgetadaptorCmd( TCL_UNUSED(void *), /* ItclObjectInfo Ptr */ Tcl_Interp *interp, /* current interpreter */ | | | 4328 4329 4330 4331 4332 4333 4334 4335 4336 4337 4338 4339 4340 4341 4342 | * ------------------------------------------------------------------------ */ static int Itcl_BiInfoWidgetadaptorCmd( TCL_UNUSED(void *), /* ItclObjectInfo Ptr */ Tcl_Interp *interp, /* current interpreter */ ItclSizeT objc, /* number of arguments */ Tcl_Obj *const objv[]) /* argument objects */ { Tcl_Namespace *contextNs = NULL; Tcl_Obj *objPtr; ItclClass *contextIclsPtr; ItclObject *contextIoPtr; char *name; |
︙ | ︙ | |||
4397 4398 4399 4400 4401 4402 4403 | * ------------------------------------------------------------------------ */ static int Itcl_BiInfoInstancesCmd( void *clientData, /* ItclObjectInfo Ptr */ Tcl_Interp *interp, /* current interpreter */ | | | 4415 4416 4417 4418 4419 4420 4421 4422 4423 4424 4425 4426 4427 4428 4429 | * ------------------------------------------------------------------------ */ static int Itcl_BiInfoInstancesCmd( void *clientData, /* ItclObjectInfo Ptr */ Tcl_Interp *interp, /* current interpreter */ ItclSizeT objc, /* number of arguments */ Tcl_Obj *const objv[]) /* argument objects */ { FOREACH_HASH_DECLS; Tcl_Obj *listPtr; Tcl_Obj *objPtr; ItclObjectInfo *infoPtr; ItclObject *ioPtr; |
︙ | ︙ | |||
4466 4467 4468 4469 4470 4471 4472 | * ------------------------------------------------------------------------ */ static int Itcl_BiInfoDelegatedOptionsCmd( TCL_UNUSED(void *), /* ItclObjectInfo Ptr */ Tcl_Interp *interp, /* current interpreter */ | | | 4484 4485 4486 4487 4488 4489 4490 4491 4492 4493 4494 4495 4496 4497 4498 | * ------------------------------------------------------------------------ */ static int Itcl_BiInfoDelegatedOptionsCmd( TCL_UNUSED(void *), /* ItclObjectInfo Ptr */ Tcl_Interp *interp, /* current interpreter */ ItclSizeT objc, /* number of arguments */ Tcl_Obj *const objv[]) /* argument objects */ { FOREACH_HASH_DECLS; Tcl_Obj *listPtr; Tcl_Obj *objPtr; Tcl_Obj *objPtr2; ItclObject *ioPtr; |
︙ | ︙ | |||
4537 4538 4539 4540 4541 4542 4543 | * ------------------------------------------------------------------------ */ static int Itcl_BiInfoDelegatedMethodsCmd( TCL_UNUSED(void *), /* ItclObjectInfo Ptr */ Tcl_Interp *interp, /* current interpreter */ | | | 4555 4556 4557 4558 4559 4560 4561 4562 4563 4564 4565 4566 4567 4568 4569 | * ------------------------------------------------------------------------ */ static int Itcl_BiInfoDelegatedMethodsCmd( TCL_UNUSED(void *), /* ItclObjectInfo Ptr */ Tcl_Interp *interp, /* current interpreter */ ItclSizeT objc, /* number of arguments */ Tcl_Obj *const objv[]) /* argument objects */ { FOREACH_HASH_DECLS; Tcl_Obj *listPtr; Tcl_Obj *objPtr; Tcl_Obj *objPtr2; ItclObject *ioPtr; |
︙ | ︙ | |||
4610 4611 4612 4613 4614 4615 4616 | * ------------------------------------------------------------------------ */ static int Itcl_BiInfoDelegatedTypeMethodsCmd( TCL_UNUSED(void *), /* ItclObjectInfo Ptr */ Tcl_Interp *interp, /* current interpreter */ | | | 4628 4629 4630 4631 4632 4633 4634 4635 4636 4637 4638 4639 4640 4641 4642 | * ------------------------------------------------------------------------ */ static int Itcl_BiInfoDelegatedTypeMethodsCmd( TCL_UNUSED(void *), /* ItclObjectInfo Ptr */ Tcl_Interp *interp, /* current interpreter */ ItclSizeT objc, /* number of arguments */ Tcl_Obj *const objv[]) /* argument objects */ { FOREACH_HASH_DECLS; Tcl_Obj *listPtr; Tcl_Obj *objPtr; Tcl_Obj *objPtr2; ItclObject *ioPtr; |
︙ | ︙ | |||
4679 4680 4681 4682 4683 4684 4685 | * ------------------------------------------------------------------------ */ static int Itcl_BiInfoDelegatedUnknownCmd( void *clientData, /* ItclObjectInfo Ptr */ Tcl_Interp *interp, /* current interpreter */ | | | 4697 4698 4699 4700 4701 4702 4703 4704 4705 4706 4707 4708 4709 4710 4711 | * ------------------------------------------------------------------------ */ static int Itcl_BiInfoDelegatedUnknownCmd( void *clientData, /* ItclObjectInfo Ptr */ Tcl_Interp *interp, /* current interpreter */ ItclSizeT objc, /* number of arguments */ Tcl_Obj *const objv[]) /* argument objects */ { Tcl_Obj *objPtr; ItclShowArgs(1, "Itcl_BiInfoDelegatedUnknownCmd", objc, objv); /* produce usage message */ objPtr = Tcl_NewStringObj( |
︙ | ︙ | |||
4714 4715 4716 4717 4718 4719 4720 | * ------------------------------------------------------------------------ */ static int Itcl_BiInfoDelegatedOptionCmd( TCL_UNUSED(void *), /* ItclObjectInfo Ptr */ Tcl_Interp *interp, /* current interpreter */ | | | 4732 4733 4734 4735 4736 4737 4738 4739 4740 4741 4742 4743 4744 4745 4746 | * ------------------------------------------------------------------------ */ static int Itcl_BiInfoDelegatedOptionCmd( TCL_UNUSED(void *), /* ItclObjectInfo Ptr */ Tcl_Interp *interp, /* current interpreter */ ItclSizeT objc, /* number of arguments */ Tcl_Obj *const objv[]) /* argument objects */ { FOREACH_HASH_DECLS; Tcl_HashSearch place; Tcl_Namespace *nsPtr; Tcl_Obj *resultPtr; Tcl_Obj *objPtr; |
︙ | ︙ | |||
4948 4949 4950 4951 4952 4953 4954 | * ------------------------------------------------------------------------ */ static int Itcl_BiInfoDelegatedMethodCmd( TCL_UNUSED(void *), /* ItclObjectInfo Ptr */ Tcl_Interp *interp, /* current interpreter */ | | | 4966 4967 4968 4969 4970 4971 4972 4973 4974 4975 4976 4977 4978 4979 4980 | * ------------------------------------------------------------------------ */ static int Itcl_BiInfoDelegatedMethodCmd( TCL_UNUSED(void *), /* ItclObjectInfo Ptr */ Tcl_Interp *interp, /* current interpreter */ ItclSizeT objc, /* number of arguments */ Tcl_Obj *const objv[]) /* argument objects */ { FOREACH_HASH_DECLS; Tcl_HashSearch place; Tcl_Obj *resultPtr; Tcl_Obj *objPtr; Tcl_Obj *cmdNamePtr; |
︙ | ︙ | |||
5172 5173 5174 5175 5176 5177 5178 | * ------------------------------------------------------------------------ */ static int Itcl_BiInfoDelegatedTypeMethodCmd( TCL_UNUSED(void *), /* ItclObjectInfo Ptr */ Tcl_Interp *interp, /* current interpreter */ | | | 5190 5191 5192 5193 5194 5195 5196 5197 5198 5199 5200 5201 5202 5203 5204 | * ------------------------------------------------------------------------ */ static int Itcl_BiInfoDelegatedTypeMethodCmd( TCL_UNUSED(void *), /* ItclObjectInfo Ptr */ Tcl_Interp *interp, /* current interpreter */ ItclSizeT objc, /* number of arguments */ Tcl_Obj *const objv[]) /* argument objects */ { FOREACH_HASH_DECLS; Tcl_HashSearch place; Tcl_Obj *resultPtr; Tcl_Obj *objPtr; |
︙ | ︙ |
Changes to generic/itclInt.h.
︙ | ︙ | |||
76 77 78 79 80 81 82 83 84 85 86 87 88 89 | # endif #endif #if TCL_MAJOR_VERSION > 8 # define ITCL_Z_MODIFIER TCL_Z_MODIFIER #else # define ITCL_Z_MODIFIER "" #endif #if !defined(ItclSizeT) #if TCL_MAJOR_VERSION > 8 #define ItclSizeT size_t #else #define ItclSizeT int | > > > > > > > > > > > > > > > > > > > > > > | 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 | # endif #endif #if TCL_MAJOR_VERSION > 8 # define ITCL_Z_MODIFIER TCL_Z_MODIFIER #else # define ITCL_Z_MODIFIER "" # undef Tcl_MethodIsType2 # undef Tcl_NewInstanceMethod2 # undef Tcl_NewMethod2 # undef Tcl_MethodType2 # undef Tcl_MethodCallProc2 # define Tcl_MethodIsType2 Tcl_MethodIsType # define Tcl_NewInstanceMethod2 Tcl_NewInstanceMethod # define Tcl_NewMethod2 Tcl_NewMethod # define Tcl_MethodType2 Tcl_MethodType # define Tcl_MethodCallProc2 Tcl_MethodCallProc # undef Tcl_CreateObjCommand2 # define Tcl_CreateObjCommand2 Tcl_CreateObjCommand # undef Tcl_NRCreateCommand2 # define Tcl_NRCreateCommand2 Tcl_NRCreateCommand # undef Tcl_NRCallObjProc2 # define Tcl_NRCallObjProc2 Tcl_NRCallObjProc # undef Itcl_RegisterObjC2 # define Itcl_RegisterObjC2 Itcl_RegisterObjC # undef Itcl_FindC2 # define Itcl_FindC2 Itcl_FindC # undef TCL_OO_METHOD_VERSION_2 # define TCL_OO_METHOD_VERSION_2 TCL_OO_METHOD_VERSION_CURRENT #endif #if !defined(ItclSizeT) #if TCL_MAJOR_VERSION > 8 #define ItclSizeT size_t #else #define ItclSizeT int |
︙ | ︙ | |||
427 428 429 430 431 432 433 | ItclSizeT maxargcount; /* max number of args in arglist */ Tcl_Obj *usagePtr; /* usage string for error messages */ Tcl_Obj *argumentPtr; /* the function arguments */ Tcl_Obj *bodyPtr; /* the function body */ ItclArgList *argListPtr; /* the parsed arguments */ union { Tcl_CmdProc *argCmd; /* (argc,argv) C implementation */ | | | 449 450 451 452 453 454 455 456 457 458 459 460 461 462 463 | ItclSizeT maxargcount; /* max number of args in arglist */ Tcl_Obj *usagePtr; /* usage string for error messages */ Tcl_Obj *argumentPtr; /* the function arguments */ Tcl_Obj *bodyPtr; /* the function body */ ItclArgList *argListPtr; /* the parsed arguments */ union { Tcl_CmdProc *argCmd; /* (argc,argv) C implementation */ Tcl_ObjCmdProc2 *objCmd; /* (objc,objv) C implementation */ } cfunc; void *clientData; /* client data for C implementations */ } ItclMemberCode; /* * Flag bits for ItclMemberCode: */ |
︙ | ︙ | |||
677 678 679 680 681 682 683 | #endif #if !defined(PTR2INT) # define PTR2INT(p) ((ptrdiff_t)(p)) #endif #ifdef ITCL_DEBUG MODULE_SCOPE int _itcl_debug_level; | | | | | | | | 699 700 701 702 703 704 705 706 707 708 709 710 711 712 713 714 715 716 717 718 719 720 721 722 723 724 725 726 727 728 729 730 731 732 733 734 735 736 737 738 739 740 741 742 743 744 745 746 747 748 749 750 | #endif #if !defined(PTR2INT) # define PTR2INT(p) ((ptrdiff_t)(p)) #endif #ifdef ITCL_DEBUG MODULE_SCOPE int _itcl_debug_level; MODULE_SCOPE void ItclShowArgs(int level, const char *str, ItclSizeT objc, Tcl_Obj *const *objv); #else #define ItclShowArgs(a,b,c,d) do {(void)(c);(void)(d);} while(0) #endif MODULE_SCOPE Tcl_ObjCmdProc2 ItclCallCCommand; MODULE_SCOPE Tcl_ObjCmdProc2 ItclObjectUnknownCommand; MODULE_SCOPE int ItclCheckCallProc(void *clientData, Tcl_Interp *interp, Tcl_ObjectContext contextPtr, Tcl_CallFrame *framePtr, int *isFinished); MODULE_SCOPE void ItclPreserveClass(ItclClass *iclsPtr); MODULE_SCOPE void ItclReleaseClass(void *iclsPtr); MODULE_SCOPE ItclFoundation *ItclGetFoundation(Tcl_Interp *interp); MODULE_SCOPE Tcl_ObjCmdProc2 ItclClassCommandDispatcher; MODULE_SCOPE Tcl_Command Itcl_CmdAliasProc(Tcl_Interp *interp, Tcl_Namespace *nsPtr, const char *cmdName, void *clientData); MODULE_SCOPE Tcl_Var Itcl_VarAliasProc(Tcl_Interp *interp, Tcl_Namespace *nsPtr, const char *VarName, void *clientData); MODULE_SCOPE int ItclIsClass(Tcl_Interp *interp, Tcl_Command cmd); MODULE_SCOPE int ItclCheckCallMethod(void *clientData, Tcl_Interp *interp, Tcl_ObjectContext contextPtr, Tcl_CallFrame *framePtr, int *isFinished); MODULE_SCOPE int ItclAfterCallMethod(void *clientData, Tcl_Interp *interp, Tcl_ObjectContext contextPtr, Tcl_Namespace *nsPtr, int result); MODULE_SCOPE void ItclReportObjectUsage(Tcl_Interp *interp, ItclObject *contextIoPtr, Tcl_Namespace *callerNsPtr, Tcl_Namespace *contextNsPtr); MODULE_SCOPE int ItclMapMethodNameProc(Tcl_Interp *interp, Tcl_Object oPtr, Tcl_Class *startClsPtr, Tcl_Obj *methodObj); MODULE_SCOPE int ItclCreateArgList(Tcl_Interp *interp, const char *str, ItclSizeT *argcPtr, ItclSizeT *maxArgcPtr, Tcl_Obj **usagePtr, ItclArgList **arglistPtrPtr, ItclMemberFunc *imPtr, const char *commandName); MODULE_SCOPE int ItclObjectCmd(void *clientData, Tcl_Interp *interp, Tcl_Object oPtr, Tcl_Class clsPtr, ItclSizeT objc, Tcl_Obj *const *objv); MODULE_SCOPE int ItclCreateObject (Tcl_Interp *interp, const char* name, ItclClass *iclsPtr, ItclSizeT objc, Tcl_Obj *const objv[]); MODULE_SCOPE void ItclDeleteObjectVariablesNamespace(Tcl_Interp *interp, ItclObject *ioPtr); MODULE_SCOPE void ItclDeleteClassVariablesNamespace(Tcl_Interp *interp, ItclClass *iclsPtr); MODULE_SCOPE int ItclInfoInit(Tcl_Interp *interp, ItclObjectInfo *infoPtr); MODULE_SCOPE Tcl_HashEntry *ItclResolveVarEntry( |
︙ | ︙ | |||
758 759 760 761 762 763 764 | ItclMemberFunc **imPtrPtr); MODULE_SCOPE int Itcl_WidgetParseInit(Tcl_Interp *interp, ItclObjectInfo *infoPtr); MODULE_SCOPE void ItclDeleteObjectMetadata(void *clientData); MODULE_SCOPE void ItclDeleteClassMetadata(void *clientData); MODULE_SCOPE void ItclDeleteArgList(ItclArgList *arglistPtr); MODULE_SCOPE int Itcl_ClassOptionCmd(void *clientData, Tcl_Interp *interp, | | | | | | | | | | | | | | | | | | | | | | | | | | | | 780 781 782 783 784 785 786 787 788 789 790 791 792 793 794 795 796 797 798 799 800 801 802 803 804 805 806 807 808 809 810 811 812 813 814 815 816 817 818 819 820 821 822 823 824 825 826 827 828 829 830 831 832 833 834 835 836 837 838 839 840 841 842 843 844 845 846 847 848 849 850 851 852 853 854 855 856 857 858 859 860 861 862 863 864 865 866 867 868 869 870 871 872 873 874 875 876 877 878 879 880 | ItclMemberFunc **imPtrPtr); MODULE_SCOPE int Itcl_WidgetParseInit(Tcl_Interp *interp, ItclObjectInfo *infoPtr); MODULE_SCOPE void ItclDeleteObjectMetadata(void *clientData); MODULE_SCOPE void ItclDeleteClassMetadata(void *clientData); MODULE_SCOPE void ItclDeleteArgList(ItclArgList *arglistPtr); MODULE_SCOPE int Itcl_ClassOptionCmd(void *clientData, Tcl_Interp *interp, ItclSizeT objc, Tcl_Obj *const objv[]); MODULE_SCOPE int DelegatedOptionsInstall(Tcl_Interp *interp, ItclClass *iclsPtr); MODULE_SCOPE int Itcl_HandleDelegateOptionCmd(Tcl_Interp *interp, ItclObject *ioPtr, ItclClass *iclsPtr, ItclDelegatedOption **idoPtrPtr, ItclSizeT objc, Tcl_Obj *const objv[]); MODULE_SCOPE int Itcl_HandleDelegateMethodCmd(Tcl_Interp *interp, ItclObject *ioPtr, ItclClass *iclsPtr, ItclDelegatedFunction **idmPtrPtr, ItclSizeT objc, Tcl_Obj *const objv[]); MODULE_SCOPE int DelegateFunction(Tcl_Interp *interp, ItclObject *ioPtr, ItclClass *iclsPtr, Tcl_Obj *componentNamePtr, ItclDelegatedFunction *idmPtr); MODULE_SCOPE int ItclInitObjectMethodVariables(Tcl_Interp *interp, ItclObject *ioPtr, ItclClass *iclsPtr, const char *name); MODULE_SCOPE int InitTclOOFunctionPointers(Tcl_Interp *interp); MODULE_SCOPE ItclOption* ItclNewOption(Tcl_Interp *interp, ItclObject *ioPtr, ItclClass *iclsPtr, Tcl_Obj *namePtr, const char *resourceName, const char *className, char *init, ItclMemberCode *mCodePtr); MODULE_SCOPE int ItclParseOption(ItclObjectInfo *infoPtr, Tcl_Interp *interp, ItclSizeT objc, Tcl_Obj *const objv[], ItclClass *iclsPtr, ItclObject *ioPtr, ItclOption **ioptPtrPtr); MODULE_SCOPE void ItclDestroyClassNamesp(void *cdata); MODULE_SCOPE int ExpandDelegateAs(Tcl_Interp *interp, ItclObject *ioPtr, ItclClass *iclsPtr, ItclDelegatedFunction *idmPtr, const char *funcName, Tcl_Obj *listPtr); MODULE_SCOPE int ItclCheckForInitializedComponents(Tcl_Interp *interp, ItclClass *iclsPtr, ItclObject *ioPtr); MODULE_SCOPE int ItclCreateDelegatedFunction(Tcl_Interp *interp, ItclClass *iclsPtr, Tcl_Obj *methodNamePtr, ItclComponent *icPtr, Tcl_Obj *targetPtr, Tcl_Obj *usingPtr, Tcl_Obj *exceptionsPtr, ItclDelegatedFunction **idmPtrPtr); MODULE_SCOPE void ItclDeleteDelegatedOption(char *cdata); MODULE_SCOPE void Itcl_FinishList(); MODULE_SCOPE void ItclDeleteDelegatedFunction(ItclDelegatedFunction *idmPtr); MODULE_SCOPE void ItclFinishEnsemble(ItclObjectInfo *infoPtr); MODULE_SCOPE int Itcl_EnsembleDeleteCmd(void *clientData, Tcl_Interp *interp, ItclSizeT objc, Tcl_Obj *const objv[]); MODULE_SCOPE int ItclAddClassesDictInfo(Tcl_Interp *interp, ItclClass *iclsPtr); MODULE_SCOPE int ItclDeleteClassesDictInfo(Tcl_Interp *interp, ItclClass *iclsPtr); MODULE_SCOPE int ItclAddObjectsDictInfo(Tcl_Interp *interp, ItclObject *ioPtr); MODULE_SCOPE int ItclDeleteObjectsDictInfo(Tcl_Interp *interp, ItclObject *ioPtr); MODULE_SCOPE int ItclAddOptionDictInfo(Tcl_Interp *interp, ItclClass *iclsPtr, ItclOption *ioptPtr); MODULE_SCOPE int ItclAddDelegatedOptionDictInfo(Tcl_Interp *interp, ItclClass *iclsPtr, ItclDelegatedOption *idoPtr); MODULE_SCOPE int ItclAddClassComponentDictInfo(Tcl_Interp *interp, ItclClass *iclsPtr, ItclComponent *icPtr); MODULE_SCOPE int ItclAddClassVariableDictInfo(Tcl_Interp *interp, ItclClass *iclsPtr, ItclVariable *ivPtr); MODULE_SCOPE int ItclAddClassFunctionDictInfo(Tcl_Interp *interp, ItclClass *iclsPtr, ItclMemberFunc *imPtr); MODULE_SCOPE int ItclAddClassDelegatedFunctionDictInfo(Tcl_Interp *interp, ItclClass *iclsPtr, ItclDelegatedFunction *idmPtr); MODULE_SCOPE int ItclClassCreateObject(void *clientData, Tcl_Interp *interp, ItclSizeT objc, Tcl_Obj *const objv[]); MODULE_SCOPE void ItclRestoreInfoVars(void *clientData); MODULE_SCOPE Tcl_ObjCmdProc2 Itcl_BiMyProcCmd; MODULE_SCOPE Tcl_ObjCmdProc2 Itcl_BiInstallComponentCmd; MODULE_SCOPE Tcl_ObjCmdProc2 Itcl_BiCallInstanceCmd; MODULE_SCOPE Tcl_ObjCmdProc2 Itcl_BiGetInstanceVarCmd; MODULE_SCOPE Tcl_ObjCmdProc2 Itcl_BiMyTypeMethodCmd; MODULE_SCOPE Tcl_ObjCmdProc2 Itcl_BiMyMethodCmd; MODULE_SCOPE Tcl_ObjCmdProc2 Itcl_BiMyTypeVarCmd; MODULE_SCOPE Tcl_ObjCmdProc2 Itcl_BiMyVarCmd; MODULE_SCOPE Tcl_ObjCmdProc2 Itcl_BiItclHullCmd; MODULE_SCOPE Tcl_ObjCmdProc2 Itcl_ThisCmd; MODULE_SCOPE Tcl_ObjCmdProc2 Itcl_ExtendedClassCmd; MODULE_SCOPE Tcl_ObjCmdProc2 Itcl_TypeClassCmd; MODULE_SCOPE Tcl_ObjCmdProc2 Itcl_AddObjectOptionCmd; MODULE_SCOPE Tcl_ObjCmdProc2 Itcl_AddDelegatedOptionCmd; MODULE_SCOPE Tcl_ObjCmdProc2 Itcl_AddDelegatedFunctionCmd; MODULE_SCOPE Tcl_ObjCmdProc2 Itcl_SetComponentCmd; MODULE_SCOPE Tcl_ObjCmdProc2 Itcl_ClassHullTypeCmd; MODULE_SCOPE Tcl_ObjCmdProc2 Itcl_ClassWidgetClassCmd; typedef int (ItclRootMethodProc)(ItclObject *ioPtr, Tcl_Interp *interp, ItclSizeT objc, Tcl_Obj *const objv[]); MODULE_SCOPE const Tcl_MethodType2 itclRootMethodType; MODULE_SCOPE ItclRootMethodProc ItclUnknownGuts; MODULE_SCOPE ItclRootMethodProc ItclConstructGuts; MODULE_SCOPE ItclRootMethodProc ItclInfoGuts; #include "itcl2TclOO.h" /* * Include all the private API, generated from itcl.decls. */ #include "itclIntDecls.h" |
Changes to generic/itclIntDecls.h.
︙ | ︙ | |||
12 13 14 15 16 17 18 | #define ItclSizeT int #endif #endif /* !BEGIN!: Do not edit below this line. */ #define ITCLINT_STUBS_EPOCH 0 | | | 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 | #define ItclSizeT int #endif #endif /* !BEGIN!: Do not edit below this line. */ #define ITCLINT_STUBS_EPOCH 0 #define ITCLINT_STUBS_REVISION 155 #ifdef __cplusplus extern "C" { #endif /* * Exported function declarations: |
︙ | ︙ | |||
77 78 79 80 81 82 83 | ITCLAPI void Itcl_InitHierIter(ItclHierIter *iter, ItclClass *iclsPtr); /* 19 */ ITCLAPI void Itcl_DeleteHierIter(ItclHierIter *iter); /* 20 */ ITCLAPI ItclClass * Itcl_AdvanceHierIter(ItclHierIter *iter); /* 21 */ | | | | | | | | | | < | | < | | | | | | | | 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 | ITCLAPI void Itcl_InitHierIter(ItclHierIter *iter, ItclClass *iclsPtr); /* 19 */ ITCLAPI void Itcl_DeleteHierIter(ItclHierIter *iter); /* 20 */ ITCLAPI ItclClass * Itcl_AdvanceHierIter(ItclHierIter *iter); /* 21 */ ITCLAPI int Itcl_FindClassesCmd(void *clientData, Tcl_Interp *interp, ItclSizeT objc, Tcl_Obj *const objv[]); /* 22 */ ITCLAPI int Itcl_FindObjectsCmd(void *clientData, Tcl_Interp *interp, ItclSizeT objc, Tcl_Obj *const objv[]); /* Slot 23 is reserved */ /* 24 */ ITCLAPI int Itcl_DelClassCmd(void *clientData, Tcl_Interp *interp, ItclSizeT objc, Tcl_Obj *const objv[]); /* 25 */ ITCLAPI int Itcl_DelObjectCmd(void *clientData, Tcl_Interp *interp, ItclSizeT objc, Tcl_Obj *const objv[]); /* 26 */ ITCLAPI int Itcl_ScopeCmd(void *clientData, Tcl_Interp *interp, ItclSizeT objc, Tcl_Obj *const objv[]); /* 27 */ ITCLAPI int Itcl_CodeCmd(void *clientData, Tcl_Interp *interp, ItclSizeT objc, Tcl_Obj *const objv[]); /* 28 */ ITCLAPI int Itcl_StubCreateCmd(void *clientData, Tcl_Interp *interp, ItclSizeT objc, Tcl_Obj *const objv[]); /* 29 */ ITCLAPI int Itcl_StubExistsCmd(void *clientData, Tcl_Interp *interp, ItclSizeT objc, Tcl_Obj *const objv[]); /* 30 */ ITCLAPI int Itcl_IsStub(Tcl_Command cmd); /* 31 */ ITCLAPI int Itcl_CreateClass(Tcl_Interp *interp, const char *path, ItclObjectInfo *info, ItclClass **rPtr); /* 32 */ ITCLAPI int Itcl_DeleteClass(Tcl_Interp *interp, ItclClass *iclsPtr); /* 33 */ ITCLAPI Tcl_Namespace * Itcl_FindClassNamespace(Tcl_Interp *interp, const char *path); /* 34 */ ITCLAPI int Itcl_HandleClass(void *clientData, Tcl_Interp *interp, ItclSizeT objc, Tcl_Obj *const objv[]); /* Slot 35 is reserved */ /* Slot 36 is reserved */ /* Slot 37 is reserved */ /* 38 */ ITCLAPI void Itcl_BuildVirtualTables(ItclClass *iclsPtr); /* 39 */ |
︙ | ︙ | |||
160 161 162 163 164 165 166 | /* Slot 47 is reserved */ /* 48 */ ITCLAPI const char * Itcl_GetInstanceVar(Tcl_Interp *interp, const char *name, ItclObject *contextIoPtr, ItclClass *contextIclsPtr); /* Slot 49 is reserved */ /* 50 */ | | | | < | | 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 | /* Slot 47 is reserved */ /* 48 */ ITCLAPI const char * Itcl_GetInstanceVar(Tcl_Interp *interp, const char *name, ItclObject *contextIoPtr, ItclClass *contextIclsPtr); /* Slot 49 is reserved */ /* 50 */ ITCLAPI int Itcl_BodyCmd(void *dummy, Tcl_Interp *interp, ItclSizeT objc, Tcl_Obj *const objv[]); /* 51 */ ITCLAPI int Itcl_ConfigBodyCmd(void *dummy, Tcl_Interp *interp, ItclSizeT objc, Tcl_Obj *const objv[]); /* 52 */ ITCLAPI int Itcl_CreateMethod(Tcl_Interp *interp, ItclClass *iclsPtr, Tcl_Obj *namePtr, const char *arglist, const char *body); /* 53 */ ITCLAPI int Itcl_CreateProc(Tcl_Interp *interp, ItclClass *iclsPtr, Tcl_Obj *namePtr, |
︙ | ︙ | |||
209 210 211 212 213 214 215 | /* Slot 64 is reserved */ /* Slot 65 is reserved */ /* Slot 66 is reserved */ /* 67 */ ITCLAPI void Itcl_GetMemberFuncUsage(ItclMemberFunc *mfunc, ItclObject *contextObj, Tcl_Obj *objPtr); /* 68 */ | | < | | < | | < | | | | | | | | | | | | | | | | | | < | | | | < | | | | < | | | | | | | | | | < | | < | | < | | | < | | | | | < | | 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 | /* Slot 64 is reserved */ /* Slot 65 is reserved */ /* Slot 66 is reserved */ /* 67 */ ITCLAPI void Itcl_GetMemberFuncUsage(ItclMemberFunc *mfunc, ItclObject *contextObj, Tcl_Obj *objPtr); /* 68 */ ITCLAPI int Itcl_ExecMethod(void *clientData, Tcl_Interp *interp, ItclSizeT objc, Tcl_Obj *const objv[]); /* 69 */ ITCLAPI int Itcl_ExecProc(void *clientData, Tcl_Interp *interp, ItclSizeT objc, Tcl_Obj *const objv[]); /* Slot 70 is reserved */ /* 71 */ ITCLAPI int Itcl_ConstructBase(Tcl_Interp *interp, ItclObject *contextObj, ItclClass *contextClass); /* 72 */ ITCLAPI int Itcl_InvokeMethodIfExists(Tcl_Interp *interp, const char *name, ItclClass *contextClass, ItclObject *contextObj, ItclSizeT objc, Tcl_Obj *const objv[]); /* Slot 73 is reserved */ /* 74 */ ITCLAPI int Itcl_ReportFuncErrors(Tcl_Interp *interp, ItclMemberFunc *mfunc, ItclObject *contextObj, int result); /* 75 */ ITCLAPI int Itcl_ParseInit(Tcl_Interp *interp, ItclObjectInfo *info); /* 76 */ ITCLAPI int Itcl_ClassCmd(void *clientData, Tcl_Interp *interp, ItclSizeT objc, Tcl_Obj *const objv[]); /* 77 */ ITCLAPI int Itcl_ClassInheritCmd(void *clientData, Tcl_Interp *interp, ItclSizeT objc, Tcl_Obj *const objv[]); /* 78 */ ITCLAPI int Itcl_ClassProtectionCmd(void *clientData, Tcl_Interp *interp, ItclSizeT objc, Tcl_Obj *const objv[]); /* 79 */ ITCLAPI int Itcl_ClassConstructorCmd(void *clientData, Tcl_Interp *interp, ItclSizeT objc, Tcl_Obj *const objv[]); /* 80 */ ITCLAPI int Itcl_ClassDestructorCmd(void *clientData, Tcl_Interp *interp, ItclSizeT objc, Tcl_Obj *const objv[]); /* 81 */ ITCLAPI int Itcl_ClassMethodCmd(void *clientData, Tcl_Interp *interp, ItclSizeT objc, Tcl_Obj *const objv[]); /* 82 */ ITCLAPI int Itcl_ClassProcCmd(void *clientData, Tcl_Interp *interp, ItclSizeT objc, Tcl_Obj *const objv[]); /* 83 */ ITCLAPI int Itcl_ClassVariableCmd(void *clientData, Tcl_Interp *interp, ItclSizeT objc, Tcl_Obj *const objv[]); /* 84 */ ITCLAPI int Itcl_ClassCommonCmd(void *clientData, Tcl_Interp *interp, ItclSizeT objc, Tcl_Obj *const objv[]); /* 85 */ ITCLAPI int Itcl_ParseVarResolver(Tcl_Interp *interp, const char *name, Tcl_Namespace *contextNs, int flags, Tcl_Var *rPtr); /* 86 */ ITCLAPI int Itcl_BiInit(Tcl_Interp *interp, ItclObjectInfo *infoPtr); /* 87 */ ITCLAPI int Itcl_InstallBiMethods(Tcl_Interp *interp, ItclClass *cdefn); /* 88 */ ITCLAPI int Itcl_BiIsaCmd(void *clientData, Tcl_Interp *interp, ItclSizeT objc, Tcl_Obj *const objv[]); /* 89 */ ITCLAPI int Itcl_BiConfigureCmd(void *clientData, Tcl_Interp *interp, ItclSizeT objc, Tcl_Obj *const objv[]); /* 90 */ ITCLAPI int Itcl_BiCgetCmd(void *clientData, Tcl_Interp *interp, ItclSizeT objc, Tcl_Obj *const objv[]); /* 91 */ ITCLAPI int Itcl_BiChainCmd(void *dummy, Tcl_Interp *interp, ItclSizeT objc, Tcl_Obj *const objv[]); /* 92 */ ITCLAPI int Itcl_BiInfoClassCmd(void *dummy, Tcl_Interp *interp, ItclSizeT objc, Tcl_Obj *const objv[]); /* 93 */ ITCLAPI int Itcl_BiInfoInheritCmd(void *dummy, Tcl_Interp *interp, ItclSizeT objc, Tcl_Obj *const objv[]); /* 94 */ ITCLAPI int Itcl_BiInfoHeritageCmd(void *dummy, Tcl_Interp *interp, ItclSizeT objc, Tcl_Obj *const objv[]); /* 95 */ ITCLAPI int Itcl_BiInfoFunctionCmd(void *dummy, Tcl_Interp *interp, ItclSizeT objc, Tcl_Obj *const objv[]); /* 96 */ ITCLAPI int Itcl_BiInfoVariableCmd(void *dummy, Tcl_Interp *interp, ItclSizeT objc, Tcl_Obj *const objv[]); /* 97 */ ITCLAPI int Itcl_BiInfoBodyCmd(void *dummy, Tcl_Interp *interp, ItclSizeT objc, Tcl_Obj *const objv[]); /* 98 */ ITCLAPI int Itcl_BiInfoArgsCmd(void *dummy, Tcl_Interp *interp, ItclSizeT objc, Tcl_Obj *const objv[]); /* Slot 99 is reserved */ /* 100 */ ITCLAPI int Itcl_EnsembleInit(Tcl_Interp *interp); /* 101 */ ITCLAPI int Itcl_CreateEnsemble(Tcl_Interp *interp, const char *ensName); /* 102 */ ITCLAPI int Itcl_AddEnsemblePart(Tcl_Interp *interp, const char *ensName, const char *partName, const char *usageInfo, Tcl_ObjCmdProc2 *objProc, void *clientData, Tcl_CmdDeleteProc *deleteProc); /* 103 */ ITCLAPI int Itcl_GetEnsemblePart(Tcl_Interp *interp, const char *ensName, const char *partName, Tcl_CmdInfo *infoPtr); /* 104 */ ITCLAPI int Itcl_IsEnsemble(Tcl_CmdInfo *infoPtr); /* 105 */ ITCLAPI int Itcl_GetEnsembleUsage(Tcl_Interp *interp, const char *ensName, Tcl_Obj *objPtr); /* 106 */ ITCLAPI int Itcl_GetEnsembleUsageForObj(Tcl_Interp *interp, Tcl_Obj *ensObjPtr, Tcl_Obj *objPtr); /* 107 */ ITCLAPI int Itcl_EnsembleCmd(void *clientData, Tcl_Interp *interp, ItclSizeT objc, Tcl_Obj *const objv[]); /* 108 */ ITCLAPI int Itcl_EnsPartCmd(void *clientData, Tcl_Interp *interp, ItclSizeT objc, Tcl_Obj *const objv[]); /* 109 */ ITCLAPI int Itcl_EnsembleErrorCmd(void *clientData, Tcl_Interp *interp, ItclSizeT objc, Tcl_Obj *const objv[]); /* Slot 110 is reserved */ /* Slot 111 is reserved */ /* Slot 112 is reserved */ /* Slot 113 is reserved */ /* Slot 114 is reserved */ /* 115 */ ITCLAPI void Itcl_Assert(const char *testExpr, const char *fileName, int lineNum); /* 116 */ ITCLAPI int Itcl_IsObjectCmd(void *clientData, Tcl_Interp *interp, ItclSizeT objc, Tcl_Obj *const objv[]); /* 117 */ ITCLAPI int Itcl_IsClassCmd(void *clientData, Tcl_Interp *interp, ItclSizeT objc, Tcl_Obj *const objv[]); /* Slot 118 is reserved */ /* Slot 119 is reserved */ /* Slot 120 is reserved */ /* Slot 121 is reserved */ /* Slot 122 is reserved */ /* Slot 123 is reserved */ /* Slot 124 is reserved */ |
︙ | ︙ | |||
399 400 401 402 403 404 405 | /* Slot 134 is reserved */ /* Slot 135 is reserved */ /* Slot 136 is reserved */ /* Slot 137 is reserved */ /* Slot 138 is reserved */ /* Slot 139 is reserved */ /* 140 */ | | | | | | | | | | | | | | | | < | | | | | < | | < | | | | < | | | | 385 386 387 388 389 390 391 392 393 394 395 396 397 398 399 400 401 402 403 404 405 406 407 408 409 410 411 412 413 414 415 416 417 418 419 420 421 422 423 424 425 426 427 428 429 430 431 432 433 434 435 436 437 438 439 440 441 442 443 444 445 446 447 448 449 450 451 452 453 454 455 456 457 458 459 460 461 462 463 464 465 466 467 468 469 470 471 472 473 474 475 476 477 478 479 | /* Slot 134 is reserved */ /* Slot 135 is reserved */ /* Slot 136 is reserved */ /* Slot 137 is reserved */ /* Slot 138 is reserved */ /* Slot 139 is reserved */ /* 140 */ ITCLAPI int Itcl_FilterAddCmd(void *clientData, Tcl_Interp *interp, ItclSizeT objc, Tcl_Obj *const objv[]); /* 141 */ ITCLAPI int Itcl_FilterDeleteCmd(void *clientData, Tcl_Interp *interp, ItclSizeT objc, Tcl_Obj *const objv[]); /* 142 */ ITCLAPI int Itcl_ForwardAddCmd(void *clientData, Tcl_Interp *interp, ItclSizeT objc, Tcl_Obj *const objv[]); /* 143 */ ITCLAPI int Itcl_ForwardDeleteCmd(void *clientData, Tcl_Interp *interp, ItclSizeT objc, Tcl_Obj *const objv[]); /* 144 */ ITCLAPI int Itcl_MixinAddCmd(void *clientData, Tcl_Interp *interp, ItclSizeT objc, Tcl_Obj *const objv[]); /* 145 */ ITCLAPI int Itcl_MixinDeleteCmd(void *clientData, Tcl_Interp *interp, ItclSizeT objc, Tcl_Obj *const objv[]); /* Slot 146 is reserved */ /* Slot 147 is reserved */ /* Slot 148 is reserved */ /* Slot 149 is reserved */ /* Slot 150 is reserved */ /* 151 */ ITCLAPI int Itcl_BiInfoUnknownCmd(void *dummy, Tcl_Interp *interp, ItclSizeT objc, Tcl_Obj *const objv[]); /* 152 */ ITCLAPI int Itcl_BiInfoVarsCmd(void *dummy, Tcl_Interp *interp, ItclSizeT objc, Tcl_Obj *const objv[]); /* 153 */ ITCLAPI int Itcl_CanAccess2(ItclClass *iclsPtr, int protection, Tcl_Namespace *fromNsPtr); /* Slot 154 is reserved */ /* Slot 155 is reserved */ /* Slot 156 is reserved */ /* Slot 157 is reserved */ /* Slot 158 is reserved */ /* Slot 159 is reserved */ /* 160 */ ITCLAPI int Itcl_SetCallFrameResolver(Tcl_Interp *interp, Tcl_Resolve *resolvePtr); /* 161 */ ITCLAPI int ItclEnsembleSubCmd(void *clientData, Tcl_Interp *interp, const char *ensembleName, ItclSizeT objc, Tcl_Obj *const *objv, const char *functionName); /* 162 */ ITCLAPI Tcl_Namespace * Itcl_GetUplevelNamespace(Tcl_Interp *interp, int level); /* 163 */ ITCLAPI void * Itcl_GetCallFrameClientData(Tcl_Interp *interp); /* Slot 164 is reserved */ /* 165 */ ITCLAPI int Itcl_SetCallFrameNamespace(Tcl_Interp *interp, Tcl_Namespace *nsPtr); /* 166 */ ITCLAPI ItclSizeT Itcl_GetCallFrameObjc(Tcl_Interp *interp); /* 167 */ ITCLAPI Tcl_Obj *const * Itcl_GetCallFrameObjv(Tcl_Interp *interp); /* 168 */ ITCLAPI int Itcl_NWidgetCmd(void *infoPtr, Tcl_Interp *interp, ItclSizeT objc, Tcl_Obj *const objv[]); /* 169 */ ITCLAPI int Itcl_AddOptionCmd(void *infoPtr, Tcl_Interp *interp, ItclSizeT objc, Tcl_Obj *const objv[]); /* 170 */ ITCLAPI int Itcl_AddComponentCmd(void *infoPtr, Tcl_Interp *interp, ItclSizeT objc, Tcl_Obj *const objv[]); /* 171 */ ITCLAPI int Itcl_BiInfoOptionCmd(void *dummy, Tcl_Interp *interp, ItclSizeT objc, Tcl_Obj *const objv[]); /* 172 */ ITCLAPI int Itcl_BiInfoComponentCmd(void *dummy, Tcl_Interp *interp, ItclSizeT objc, Tcl_Obj *const objv[]); /* 173 */ ITCLAPI int Itcl_RenameCommand(Tcl_Interp *interp, const char *oldName, const char *newName); /* 174 */ ITCLAPI int Itcl_PushCallFrame(Tcl_Interp *interp, Tcl_CallFrame *framePtr, |
︙ | ︙ | |||
508 509 510 511 512 513 514 | ITCLAPI const char* ItclSetInstanceVar(Tcl_Interp *interp, const char *name, const char *name2, const char *value, ItclObject *contextIoPtr, ItclClass *contextIclsPtr); /* 179 */ ITCLAPI Tcl_Obj * ItclCapitalize(const char *str); /* 180 */ | | | | | 490 491 492 493 494 495 496 497 498 499 500 501 502 503 504 505 506 | ITCLAPI const char* ItclSetInstanceVar(Tcl_Interp *interp, const char *name, const char *name2, const char *value, ItclObject *contextIoPtr, ItclClass *contextIclsPtr); /* 179 */ ITCLAPI Tcl_Obj * ItclCapitalize(const char *str); /* 180 */ ITCLAPI int ItclClassBaseCmd(void *clientData, Tcl_Interp *interp, int flags, ItclSizeT objc, Tcl_Obj *const objv[], ItclClass **iclsPtrPtr); /* 181 */ ITCLAPI int ItclCreateComponent(Tcl_Interp *interp, ItclClass *iclsPtr, Tcl_Obj *componentPtr, int type, ItclComponent **icPtrPtr); /* 182 */ ITCLAPI void Itcl_SetContext(Tcl_Interp *interp, |
︙ | ︙ | |||
553 554 555 556 557 558 559 | Tcl_Obj * (*itcl_CreateArgs) (Tcl_Interp *interp, const char *string, ItclSizeT objc, Tcl_Obj *const objv[]); /* 14 */ void (*reserved15)(void); void (*reserved16)(void); int (*itcl_GetContext) (Tcl_Interp *interp, ItclClass **iclsPtrPtr, ItclObject **ioPtrPtr); /* 17 */ void (*itcl_InitHierIter) (ItclHierIter *iter, ItclClass *iclsPtr); /* 18 */ void (*itcl_DeleteHierIter) (ItclHierIter *iter); /* 19 */ ItclClass * (*itcl_AdvanceHierIter) (ItclHierIter *iter); /* 20 */ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 535 536 537 538 539 540 541 542 543 544 545 546 547 548 549 550 551 552 553 554 555 556 557 558 559 560 561 562 563 564 565 566 567 568 569 570 571 572 573 574 575 576 577 578 579 580 581 582 583 584 585 586 587 588 589 590 591 592 593 594 595 596 597 598 599 600 601 602 603 604 605 606 607 608 609 610 611 612 613 614 615 616 617 618 619 620 621 622 623 624 625 626 627 628 629 630 631 632 633 634 635 636 637 638 639 640 641 642 643 644 645 | Tcl_Obj * (*itcl_CreateArgs) (Tcl_Interp *interp, const char *string, ItclSizeT objc, Tcl_Obj *const objv[]); /* 14 */ void (*reserved15)(void); void (*reserved16)(void); int (*itcl_GetContext) (Tcl_Interp *interp, ItclClass **iclsPtrPtr, ItclObject **ioPtrPtr); /* 17 */ void (*itcl_InitHierIter) (ItclHierIter *iter, ItclClass *iclsPtr); /* 18 */ void (*itcl_DeleteHierIter) (ItclHierIter *iter); /* 19 */ ItclClass * (*itcl_AdvanceHierIter) (ItclHierIter *iter); /* 20 */ int (*itcl_FindClassesCmd) (void *clientData, Tcl_Interp *interp, ItclSizeT objc, Tcl_Obj *const objv[]); /* 21 */ int (*itcl_FindObjectsCmd) (void *clientData, Tcl_Interp *interp, ItclSizeT objc, Tcl_Obj *const objv[]); /* 22 */ void (*reserved23)(void); int (*itcl_DelClassCmd) (void *clientData, Tcl_Interp *interp, ItclSizeT objc, Tcl_Obj *const objv[]); /* 24 */ int (*itcl_DelObjectCmd) (void *clientData, Tcl_Interp *interp, ItclSizeT objc, Tcl_Obj *const objv[]); /* 25 */ int (*itcl_ScopeCmd) (void *clientData, Tcl_Interp *interp, ItclSizeT objc, Tcl_Obj *const objv[]); /* 26 */ int (*itcl_CodeCmd) (void *clientData, Tcl_Interp *interp, ItclSizeT objc, Tcl_Obj *const objv[]); /* 27 */ int (*itcl_StubCreateCmd) (void *clientData, Tcl_Interp *interp, ItclSizeT objc, Tcl_Obj *const objv[]); /* 28 */ int (*itcl_StubExistsCmd) (void *clientData, Tcl_Interp *interp, ItclSizeT objc, Tcl_Obj *const objv[]); /* 29 */ int (*itcl_IsStub) (Tcl_Command cmd); /* 30 */ int (*itcl_CreateClass) (Tcl_Interp *interp, const char *path, ItclObjectInfo *info, ItclClass **rPtr); /* 31 */ int (*itcl_DeleteClass) (Tcl_Interp *interp, ItclClass *iclsPtr); /* 32 */ Tcl_Namespace * (*itcl_FindClassNamespace) (Tcl_Interp *interp, const char *path); /* 33 */ int (*itcl_HandleClass) (void *clientData, Tcl_Interp *interp, ItclSizeT objc, Tcl_Obj *const objv[]); /* 34 */ void (*reserved35)(void); void (*reserved36)(void); void (*reserved37)(void); void (*itcl_BuildVirtualTables) (ItclClass *iclsPtr); /* 38 */ int (*itcl_CreateVariable) (Tcl_Interp *interp, ItclClass *iclsPtr, Tcl_Obj *name, char *init, char *config, ItclVariable **ivPtr); /* 39 */ void (*itcl_DeleteVariable) (char *cdata); /* 40 */ const char * (*itcl_GetCommonVar) (Tcl_Interp *interp, const char *name, ItclClass *contextClass); /* 41 */ void (*reserved42)(void); void (*reserved43)(void); int (*itcl_CreateObject) (Tcl_Interp *interp, const char*name, ItclClass *iclsPtr, ItclSizeT objc, Tcl_Obj *const objv[], ItclObject **rioPtr); /* 44 */ int (*itcl_DeleteObject) (Tcl_Interp *interp, ItclObject *contextObj); /* 45 */ int (*itcl_DestructObject) (Tcl_Interp *interp, ItclObject *contextObj, int flags); /* 46 */ void (*reserved47)(void); const char * (*itcl_GetInstanceVar) (Tcl_Interp *interp, const char *name, ItclObject *contextIoPtr, ItclClass *contextIclsPtr); /* 48 */ void (*reserved49)(void); int (*itcl_BodyCmd) (void *dummy, Tcl_Interp *interp, ItclSizeT objc, Tcl_Obj *const objv[]); /* 50 */ int (*itcl_ConfigBodyCmd) (void *dummy, Tcl_Interp *interp, ItclSizeT objc, Tcl_Obj *const objv[]); /* 51 */ int (*itcl_CreateMethod) (Tcl_Interp *interp, ItclClass *iclsPtr, Tcl_Obj *namePtr, const char *arglist, const char *body); /* 52 */ int (*itcl_CreateProc) (Tcl_Interp *interp, ItclClass *iclsPtr, Tcl_Obj *namePtr, const char *arglist, const char *body); /* 53 */ int (*itcl_CreateMemberFunc) (Tcl_Interp *interp, ItclClass *iclsPtr, Tcl_Obj *name, const char *arglist, const char *body, ItclMemberFunc **mfuncPtr); /* 54 */ int (*itcl_ChangeMemberFunc) (Tcl_Interp *interp, ItclMemberFunc *mfunc, const char *arglist, const char *body); /* 55 */ void (*itcl_DeleteMemberFunc) (void *cdata); /* 56 */ int (*itcl_CreateMemberCode) (Tcl_Interp *interp, ItclClass *iclsPtr, const char *arglist, const char *body, ItclMemberCode **mcodePtr); /* 57 */ void (*itcl_DeleteMemberCode) (void *cdata); /* 58 */ int (*itcl_GetMemberCode) (Tcl_Interp *interp, ItclMemberFunc *mfunc); /* 59 */ void (*reserved60)(void); int (*itcl_EvalMemberCode) (Tcl_Interp *interp, ItclMemberFunc *mfunc, ItclObject *contextObj, ItclSizeT objc, Tcl_Obj *const objv[]); /* 61 */ void (*reserved62)(void); void (*reserved63)(void); void (*reserved64)(void); void (*reserved65)(void); void (*reserved66)(void); void (*itcl_GetMemberFuncUsage) (ItclMemberFunc *mfunc, ItclObject *contextObj, Tcl_Obj *objPtr); /* 67 */ int (*itcl_ExecMethod) (void *clientData, Tcl_Interp *interp, ItclSizeT objc, Tcl_Obj *const objv[]); /* 68 */ int (*itcl_ExecProc) (void *clientData, Tcl_Interp *interp, ItclSizeT objc, Tcl_Obj *const objv[]); /* 69 */ void (*reserved70)(void); int (*itcl_ConstructBase) (Tcl_Interp *interp, ItclObject *contextObj, ItclClass *contextClass); /* 71 */ int (*itcl_InvokeMethodIfExists) (Tcl_Interp *interp, const char *name, ItclClass *contextClass, ItclObject *contextObj, ItclSizeT objc, Tcl_Obj *const objv[]); /* 72 */ void (*reserved73)(void); int (*itcl_ReportFuncErrors) (Tcl_Interp *interp, ItclMemberFunc *mfunc, ItclObject *contextObj, int result); /* 74 */ int (*itcl_ParseInit) (Tcl_Interp *interp, ItclObjectInfo *info); /* 75 */ int (*itcl_ClassCmd) (void *clientData, Tcl_Interp *interp, ItclSizeT objc, Tcl_Obj *const objv[]); /* 76 */ int (*itcl_ClassInheritCmd) (void *clientData, Tcl_Interp *interp, ItclSizeT objc, Tcl_Obj *const objv[]); /* 77 */ int (*itcl_ClassProtectionCmd) (void *clientData, Tcl_Interp *interp, ItclSizeT objc, Tcl_Obj *const objv[]); /* 78 */ int (*itcl_ClassConstructorCmd) (void *clientData, Tcl_Interp *interp, ItclSizeT objc, Tcl_Obj *const objv[]); /* 79 */ int (*itcl_ClassDestructorCmd) (void *clientData, Tcl_Interp *interp, ItclSizeT objc, Tcl_Obj *const objv[]); /* 80 */ int (*itcl_ClassMethodCmd) (void *clientData, Tcl_Interp *interp, ItclSizeT objc, Tcl_Obj *const objv[]); /* 81 */ int (*itcl_ClassProcCmd) (void *clientData, Tcl_Interp *interp, ItclSizeT objc, Tcl_Obj *const objv[]); /* 82 */ int (*itcl_ClassVariableCmd) (void *clientData, Tcl_Interp *interp, ItclSizeT objc, Tcl_Obj *const objv[]); /* 83 */ int (*itcl_ClassCommonCmd) (void *clientData, Tcl_Interp *interp, ItclSizeT objc, Tcl_Obj *const objv[]); /* 84 */ int (*itcl_ParseVarResolver) (Tcl_Interp *interp, const char *name, Tcl_Namespace *contextNs, int flags, Tcl_Var *rPtr); /* 85 */ int (*itcl_BiInit) (Tcl_Interp *interp, ItclObjectInfo *infoPtr); /* 86 */ int (*itcl_InstallBiMethods) (Tcl_Interp *interp, ItclClass *cdefn); /* 87 */ int (*itcl_BiIsaCmd) (void *clientData, Tcl_Interp *interp, ItclSizeT objc, Tcl_Obj *const objv[]); /* 88 */ int (*itcl_BiConfigureCmd) (void *clientData, Tcl_Interp *interp, ItclSizeT objc, Tcl_Obj *const objv[]); /* 89 */ int (*itcl_BiCgetCmd) (void *clientData, Tcl_Interp *interp, ItclSizeT objc, Tcl_Obj *const objv[]); /* 90 */ int (*itcl_BiChainCmd) (void *dummy, Tcl_Interp *interp, ItclSizeT objc, Tcl_Obj *const objv[]); /* 91 */ int (*itcl_BiInfoClassCmd) (void *dummy, Tcl_Interp *interp, ItclSizeT objc, Tcl_Obj *const objv[]); /* 92 */ int (*itcl_BiInfoInheritCmd) (void *dummy, Tcl_Interp *interp, ItclSizeT objc, Tcl_Obj *const objv[]); /* 93 */ int (*itcl_BiInfoHeritageCmd) (void *dummy, Tcl_Interp *interp, ItclSizeT objc, Tcl_Obj *const objv[]); /* 94 */ int (*itcl_BiInfoFunctionCmd) (void *dummy, Tcl_Interp *interp, ItclSizeT objc, Tcl_Obj *const objv[]); /* 95 */ int (*itcl_BiInfoVariableCmd) (void *dummy, Tcl_Interp *interp, ItclSizeT objc, Tcl_Obj *const objv[]); /* 96 */ int (*itcl_BiInfoBodyCmd) (void *dummy, Tcl_Interp *interp, ItclSizeT objc, Tcl_Obj *const objv[]); /* 97 */ int (*itcl_BiInfoArgsCmd) (void *dummy, Tcl_Interp *interp, ItclSizeT objc, Tcl_Obj *const objv[]); /* 98 */ void (*reserved99)(void); int (*itcl_EnsembleInit) (Tcl_Interp *interp); /* 100 */ int (*itcl_CreateEnsemble) (Tcl_Interp *interp, const char *ensName); /* 101 */ int (*itcl_AddEnsemblePart) (Tcl_Interp *interp, const char *ensName, const char *partName, const char *usageInfo, Tcl_ObjCmdProc2 *objProc, void *clientData, Tcl_CmdDeleteProc *deleteProc); /* 102 */ int (*itcl_GetEnsemblePart) (Tcl_Interp *interp, const char *ensName, const char *partName, Tcl_CmdInfo *infoPtr); /* 103 */ int (*itcl_IsEnsemble) (Tcl_CmdInfo *infoPtr); /* 104 */ int (*itcl_GetEnsembleUsage) (Tcl_Interp *interp, const char *ensName, Tcl_Obj *objPtr); /* 105 */ int (*itcl_GetEnsembleUsageForObj) (Tcl_Interp *interp, Tcl_Obj *ensObjPtr, Tcl_Obj *objPtr); /* 106 */ int (*itcl_EnsembleCmd) (void *clientData, Tcl_Interp *interp, ItclSizeT objc, Tcl_Obj *const objv[]); /* 107 */ int (*itcl_EnsPartCmd) (void *clientData, Tcl_Interp *interp, ItclSizeT objc, Tcl_Obj *const objv[]); /* 108 */ int (*itcl_EnsembleErrorCmd) (void *clientData, Tcl_Interp *interp, ItclSizeT objc, Tcl_Obj *const objv[]); /* 109 */ void (*reserved110)(void); void (*reserved111)(void); void (*reserved112)(void); void (*reserved113)(void); void (*reserved114)(void); void (*itcl_Assert) (const char *testExpr, const char *fileName, int lineNum); /* 115 */ int (*itcl_IsObjectCmd) (void *clientData, Tcl_Interp *interp, ItclSizeT objc, Tcl_Obj *const objv[]); /* 116 */ int (*itcl_IsClassCmd) (void *clientData, Tcl_Interp *interp, ItclSizeT objc, Tcl_Obj *const objv[]); /* 117 */ void (*reserved118)(void); void (*reserved119)(void); void (*reserved120)(void); void (*reserved121)(void); void (*reserved122)(void); void (*reserved123)(void); void (*reserved124)(void); |
︙ | ︙ | |||
672 673 674 675 676 677 678 | void (*reserved133)(void); void (*reserved134)(void); void (*reserved135)(void); void (*reserved136)(void); void (*reserved137)(void); void (*reserved138)(void); void (*reserved139)(void); | | | | | | | | | | | | | | | | | | 654 655 656 657 658 659 660 661 662 663 664 665 666 667 668 669 670 671 672 673 674 675 676 677 678 679 680 681 682 683 684 685 686 687 688 689 690 691 692 693 694 695 696 697 698 699 700 701 702 703 704 705 706 707 708 | void (*reserved133)(void); void (*reserved134)(void); void (*reserved135)(void); void (*reserved136)(void); void (*reserved137)(void); void (*reserved138)(void); void (*reserved139)(void); int (*itcl_FilterAddCmd) (void *clientData, Tcl_Interp *interp, ItclSizeT objc, Tcl_Obj *const objv[]); /* 140 */ int (*itcl_FilterDeleteCmd) (void *clientData, Tcl_Interp *interp, ItclSizeT objc, Tcl_Obj *const objv[]); /* 141 */ int (*itcl_ForwardAddCmd) (void *clientData, Tcl_Interp *interp, ItclSizeT objc, Tcl_Obj *const objv[]); /* 142 */ int (*itcl_ForwardDeleteCmd) (void *clientData, Tcl_Interp *interp, ItclSizeT objc, Tcl_Obj *const objv[]); /* 143 */ int (*itcl_MixinAddCmd) (void *clientData, Tcl_Interp *interp, ItclSizeT objc, Tcl_Obj *const objv[]); /* 144 */ int (*itcl_MixinDeleteCmd) (void *clientData, Tcl_Interp *interp, ItclSizeT objc, Tcl_Obj *const objv[]); /* 145 */ void (*reserved146)(void); void (*reserved147)(void); void (*reserved148)(void); void (*reserved149)(void); void (*reserved150)(void); int (*itcl_BiInfoUnknownCmd) (void *dummy, Tcl_Interp *interp, ItclSizeT objc, Tcl_Obj *const objv[]); /* 151 */ int (*itcl_BiInfoVarsCmd) (void *dummy, Tcl_Interp *interp, ItclSizeT objc, Tcl_Obj *const objv[]); /* 152 */ int (*itcl_CanAccess2) (ItclClass *iclsPtr, int protection, Tcl_Namespace *fromNsPtr); /* 153 */ void (*reserved154)(void); void (*reserved155)(void); void (*reserved156)(void); void (*reserved157)(void); void (*reserved158)(void); void (*reserved159)(void); int (*itcl_SetCallFrameResolver) (Tcl_Interp *interp, Tcl_Resolve *resolvePtr); /* 160 */ int (*itclEnsembleSubCmd) (void *clientData, Tcl_Interp *interp, const char *ensembleName, ItclSizeT objc, Tcl_Obj *const *objv, const char *functionName); /* 161 */ Tcl_Namespace * (*itcl_GetUplevelNamespace) (Tcl_Interp *interp, int level); /* 162 */ void * (*itcl_GetCallFrameClientData) (Tcl_Interp *interp); /* 163 */ void (*reserved164)(void); int (*itcl_SetCallFrameNamespace) (Tcl_Interp *interp, Tcl_Namespace *nsPtr); /* 165 */ ItclSizeT (*itcl_GetCallFrameObjc) (Tcl_Interp *interp); /* 166 */ Tcl_Obj *const * (*itcl_GetCallFrameObjv) (Tcl_Interp *interp); /* 167 */ int (*itcl_NWidgetCmd) (void *infoPtr, Tcl_Interp *interp, ItclSizeT objc, Tcl_Obj *const objv[]); /* 168 */ int (*itcl_AddOptionCmd) (void *infoPtr, Tcl_Interp *interp, ItclSizeT objc, Tcl_Obj *const objv[]); /* 169 */ int (*itcl_AddComponentCmd) (void *infoPtr, Tcl_Interp *interp, ItclSizeT objc, Tcl_Obj *const objv[]); /* 170 */ int (*itcl_BiInfoOptionCmd) (void *dummy, Tcl_Interp *interp, ItclSizeT objc, Tcl_Obj *const objv[]); /* 171 */ int (*itcl_BiInfoComponentCmd) (void *dummy, Tcl_Interp *interp, ItclSizeT objc, Tcl_Obj *const objv[]); /* 172 */ int (*itcl_RenameCommand) (Tcl_Interp *interp, const char *oldName, const char *newName); /* 173 */ int (*itcl_PushCallFrame) (Tcl_Interp *interp, Tcl_CallFrame *framePtr, Tcl_Namespace *nsPtr, int isProcCallFrame); /* 174 */ void (*itcl_PopCallFrame) (Tcl_Interp *interp); /* 175 */ Tcl_CallFrame * (*itcl_GetUplevelCallFrame) (Tcl_Interp *interp, int level); /* 176 */ Tcl_CallFrame * (*itcl_ActivateCallFrame) (Tcl_Interp *interp, Tcl_CallFrame *framePtr); /* 177 */ const char* (*itclSetInstanceVar) (Tcl_Interp *interp, const char *name, const char *name2, const char *value, ItclObject *contextIoPtr, ItclClass *contextIclsPtr); /* 178 */ Tcl_Obj * (*itclCapitalize) (const char *str); /* 179 */ int (*itclClassBaseCmd) (void *clientData, Tcl_Interp *interp, int flags, ItclSizeT objc, Tcl_Obj *const objv[], ItclClass **iclsPtrPtr); /* 180 */ int (*itclCreateComponent) (Tcl_Interp *interp, ItclClass *iclsPtr, Tcl_Obj *componentPtr, int type, ItclComponent **icPtrPtr); /* 181 */ void (*itcl_SetContext) (Tcl_Interp *interp, ItclObject *ioPtr); /* 182 */ void (*itcl_UnsetContext) (Tcl_Interp *interp); /* 183 */ const char * (*itclGetInstanceVar) (Tcl_Interp *interp, const char *name, const char *name2, ItclObject *ioPtr, ItclClass *iclsPtr); /* 184 */ } ItclIntStubs; extern const ItclIntStubs *itclIntStubsPtr; |
︙ | ︙ |
Changes to generic/itclLinkage.c.
︙ | ︙ | |||
26 27 28 29 30 31 32 33 34 35 36 37 38 | * ======================================================================== * Copyright (c) 1993-1998 Lucent Technologies, Inc. * ------------------------------------------------------------------------ * See the file "license.terms" for information on usage and redistribution * of this file, and for a DISCLAIMER OF ALL WARRANTIES. */ #include "itclInt.h" /* * These records store the pointers for all "RegisterC" functions. */ typedef struct ItclCfunc { Tcl_CmdProc *argCmdProc; /* old-style (argc,argv) command handler */ | > | | 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 | * ======================================================================== * Copyright (c) 1993-1998 Lucent Technologies, Inc. * ------------------------------------------------------------------------ * See the file "license.terms" for information on usage and redistribution * of this file, and for a DISCLAIMER OF ALL WARRANTIES. */ #include "itclInt.h" #include <limits.h> /* * These records store the pointers for all "RegisterC" functions. */ typedef struct ItclCfunc { Tcl_CmdProc *argCmdProc; /* old-style (argc,argv) command handler */ Tcl_ObjCmdProc2 *objCmdProc; /* new (objc,objv) command handler */ void *clientData; /* client data passed into this function */ Tcl_CmdDeleteProc *deleteProc; /* proc called to free clientData */ } ItclCfunc; static Tcl_HashTable* ItclGetRegisteredProcs(Tcl_Interp *interp); static void ItclFreeC(void *clientData, Tcl_Interp *interp); |
︙ | ︙ | |||
153 154 155 156 157 158 159 160 | * if a name is redefined to a different handler of the same style, * this procedure returns an error. * * Returns TCL_OK on success, or TCL_ERROR (along with an error message * in interp->result) if anything goes wrong. * ------------------------------------------------------------------------ */ int | > | | | 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 | * if a name is redefined to a different handler of the same style, * this procedure returns an error. * * Returns TCL_OK on success, or TCL_ERROR (along with an error message * in interp->result) if anything goes wrong. * ------------------------------------------------------------------------ */ int Itcl_RegisterObjC2( Tcl_Interp *interp, /* interpreter handling this registration */ const char *name, /* symbolic name for procedure */ Tcl_ObjCmdProc2 *proc, /* procedure handling Tcl command */ void *clientData, /* client data associated with proc */ Tcl_CmdDeleteProc *deleteProc) /* proc called to free up client data */ { int newEntry; Tcl_HashEntry *entry; Tcl_HashTable *procTable; ItclCfunc *cfunc; |
︙ | ︙ | |||
209 210 211 212 213 214 215 | cfunc->clientData = clientData; cfunc->deleteProc = deleteProc; Tcl_SetHashValue(entry, cfunc); return TCL_OK; } | > | > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > | | | 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 | cfunc->clientData = clientData; cfunc->deleteProc = deleteProc; Tcl_SetHashValue(entry, cfunc); return TCL_OK; } #if TCL_MAJOR_VERSION > 8 typedef struct { void *clientData; /* Arbitrary value to pass to object function. */ Tcl_ObjCmdProc *proc; Tcl_CmdDeleteProc *deleteProc; } CmdWrapperInfo; static int cmdWrapperProc(void *clientData, Tcl_Interp *interp, size_t objc, struct Tcl_Obj * const *objv) { CmdWrapperInfo *info = (CmdWrapperInfo *)clientData; if (objc > INT_MAX) { Tcl_WrongNumArgs(interp, 1, objv, "?args?"); return TCL_ERROR; } return info->proc(info->clientData, interp, objc, objv); } static void cmdWrapperDeleteProc(void *clientData) { CmdWrapperInfo *info = (CmdWrapperInfo *)clientData; clientData = info->clientData; Tcl_CmdDeleteProc *deleteProc = info->deleteProc; ckfree(info); if (deleteProc != NULL) { deleteProc(clientData); } } int Itcl_RegisterObjC( Tcl_Interp *interp, /* interpreter handling this registration */ const char *name, /* symbolic name for procedure */ Tcl_ObjCmdProc *proc, /* procedure handling Tcl command */ void *clientData, /* client data associated with proc */ Tcl_CmdDeleteProc *deleteProc) /* proc called to free up client data */ { CmdWrapperInfo *info = (CmdWrapperInfo *)ckalloc(sizeof(CmdWrapperInfo)); info->proc = proc; info->deleteProc = deleteProc; info->clientData = clientData; return Itcl_RegisterObjC2(interp, name, (proc ? cmdWrapperProc : NULL), info, cmdWrapperDeleteProc); } #endif /* * ------------------------------------------------------------------------ * Itcl_FindC() * * Used to query a C procedure via its symbolic name. Looks at the * list of procedures registered previously by either Itcl_RegisterC * or Itcl_RegisterObjC and returns pointers to the appropriate * (argc,argv) or (objc,objv) handlers. Returns non-zero if the * name is recognized and pointers are returned; returns zero * otherwise. * ------------------------------------------------------------------------ */ int Itcl_FindC2( Tcl_Interp *interp, /* interpreter handling this registration */ const char *name, /* symbolic name for procedure */ Tcl_CmdProc **argProcPtr, /* returns (argc,argv) command handler */ Tcl_ObjCmdProc2 **objProcPtr, /* returns (objc,objv) command handler */ void **cDataPtr) /* returns client data */ { Tcl_HashEntry *entry; Tcl_HashTable *procTable; ItclCfunc *cfunc; *argProcPtr = NULL; /* assume info won't be found */ |
︙ | ︙ | |||
255 256 257 258 259 260 261 | *cDataPtr = cfunc->clientData; } } } return (*argProcPtr != NULL || *objProcPtr != NULL); } | > > > > > > > > | > > > > > > > > > > > > | 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 | *cDataPtr = cfunc->clientData; } } } return (*argProcPtr != NULL || *objProcPtr != NULL); } #if TCL_MAJOR_VERSION > 8 int Itcl_FindC( Tcl_Interp *interp, /* interpreter handling this registration */ const char *name, /* symbolic name for procedure */ Tcl_CmdProc **argProcPtr, /* returns (argc,argv) command handler */ Tcl_ObjCmdProc **objProcPtr, /* returns (objc,objv) command handler */ void **cDataPtr) /* returns client data */ { Tcl_ObjCmdProc2 *proc2; int result = Itcl_FindC2(interp, name, argProcPtr, &proc2, cDataPtr); if (result && proc2 == cmdWrapperProc) { CmdWrapperInfo *info = (CmdWrapperInfo *)ckalloc(sizeof(CmdWrapperInfo)); *objProcPtr = info->proc; *cDataPtr = info->clientData; } return result; } #endif /* * ------------------------------------------------------------------------ * ItclGetRegisteredProcs() * * Returns a pointer to a hash table containing the list of registered * procs in the specified interpreter. If the hash table does not * already exist, it is created. |
︙ | ︙ |
Changes to generic/itclMethod.c.
︙ | ︙ | |||
62 63 64 65 66 67 68 | * Returns TCL_OK/TCL_ERROR to indicate success/failure. * ------------------------------------------------------------------------ */ static int NRBodyCmd( TCL_UNUSED(void *), /* */ Tcl_Interp *interp, /* current interpreter */ | | | 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 | * Returns TCL_OK/TCL_ERROR to indicate success/failure. * ------------------------------------------------------------------------ */ static int NRBodyCmd( TCL_UNUSED(void *), /* */ Tcl_Interp *interp, /* current interpreter */ ItclSizeT objc, /* number of arguments */ Tcl_Obj *const *objv) /* argument objects */ { Tcl_HashEntry *entry; Tcl_DString buffer; Tcl_Obj *objPtr; ItclClass *iclsPtr; ItclMemberFunc *imPtr; |
︙ | ︙ | |||
156 157 158 159 160 161 162 | } int Itcl_BodyCmd( void *clientData, Tcl_Interp *interp, | | | | 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 | } int Itcl_BodyCmd( void *clientData, Tcl_Interp *interp, ItclSizeT objc, Tcl_Obj *const *objv) { return Tcl_NRCallObjProc2(interp, NRBodyCmd, clientData, objc, objv); } /* * ------------------------------------------------------------------------ * Itcl_ConfigBodyCmd() |
︙ | ︙ | |||
187 188 189 190 191 192 193 | * ------------------------------------------------------------------------ */ static int NRConfigBodyCmd( TCL_UNUSED(void *), /* unused */ Tcl_Interp *interp, /* current interpreter */ | | | 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 | * ------------------------------------------------------------------------ */ static int NRConfigBodyCmd( TCL_UNUSED(void *), /* unused */ Tcl_Interp *interp, /* current interpreter */ ItclSizeT objc, /* number of arguments */ Tcl_Obj *const objv[]) /* argument objects */ { int status = TCL_OK; const char *head; const char *tail; const char *token; |
︙ | ︙ | |||
289 290 291 292 293 294 295 | } int Itcl_ConfigBodyCmd( void *clientData, Tcl_Interp *interp, | | | | 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 | } int Itcl_ConfigBodyCmd( void *clientData, Tcl_Interp *interp, ItclSizeT objc, Tcl_Obj *const *objv) { return Tcl_NRCallObjProc2(interp, NRConfigBodyCmd, clientData, objc, objv); } /* * ------------------------------------------------------------------------ * Itcl_CreateMethod() |
︙ | ︙ | |||
905 906 907 908 909 910 911 | * as a symbolic name for a C procedure. */ if (body == NULL) { /* No-op */ } else { if (*body == '@') { Tcl_CmdProc *argCmdProc; | | | 905 906 907 908 909 910 911 912 913 914 915 916 917 918 919 | * as a symbolic name for a C procedure. */ if (body == NULL) { /* No-op */ } else { if (*body == '@') { Tcl_CmdProc *argCmdProc; Tcl_ObjCmdProc2 *objCmdProc; void *cdata; int isDone; isDone = 0; if (strcmp(body, "@itcl-builtin-cget") == 0) { isDone = 1; } |
︙ | ︙ | |||
986 987 988 989 990 991 992 | if (strncmp(body, "@itcl-builtin-setget", 20) == 0) { isDone = 1; } if (strcmp(body, "@itcl-builtin-classunknown") == 0) { isDone = 1; } if (!isDone) { | | | 986 987 988 989 990 991 992 993 994 995 996 997 998 999 1000 | if (strncmp(body, "@itcl-builtin-setget", 20) == 0) { isDone = 1; } if (strcmp(body, "@itcl-builtin-classunknown") == 0) { isDone = 1; } if (!isDone) { if (!Itcl_FindC2(interp, body+1, &argCmdProc, &objCmdProc, &cdata)) { Tcl_AppendResult(interp, "no registered C procedure with name \"", body+1, "\"", NULL); Itcl_PreserveData(mcode); Itcl_ReleaseData(mcode); return TCL_ERROR; |
︙ | ︙ | |||
1187 1188 1189 1190 1191 1192 1193 | void *data[], Tcl_Interp *interp, int result) { Tcl_Object oPtr; ItclMemberFunc *imPtr = (ItclMemberFunc *)data[0]; ItclObject *ioPtr = (ItclObject *)data[1]; | | | 1187 1188 1189 1190 1191 1192 1193 1194 1195 1196 1197 1198 1199 1200 1201 | void *data[], Tcl_Interp *interp, int result) { Tcl_Object oPtr; ItclMemberFunc *imPtr = (ItclMemberFunc *)data[0]; ItclObject *ioPtr = (ItclObject *)data[1]; ItclSizeT objc = PTR2INT(data[2]); Tcl_Obj **objv = (Tcl_Obj **)data[3]; ItclShowArgs(1, "CallItclObjectCmd", objc, objv); if (ioPtr != NULL) { ioPtr->hadConstructorError = 0; } if (imPtr->flags & (ITCL_CONSTRUCTOR|ITCL_DESTRUCTOR)) { |
︙ | ︙ | |||
1634 1635 1636 1637 1638 1639 1640 | * the most-specific class scope. * ------------------------------------------------------------------------ */ static int NRExecMethod( void *clientData, /* method definition */ Tcl_Interp *interp, /* current interpreter */ | | | 1634 1635 1636 1637 1638 1639 1640 1641 1642 1643 1644 1645 1646 1647 1648 | * the most-specific class scope. * ------------------------------------------------------------------------ */ static int NRExecMethod( void *clientData, /* method definition */ Tcl_Interp *interp, /* current interpreter */ ItclSizeT objc, /* number of arguments */ Tcl_Obj *const *objv) /* argument objects */ { ItclMemberFunc *imPtr = (ItclMemberFunc*)clientData; int result = TCL_OK; const char *token; Tcl_HashEntry *entry; |
︙ | ︙ | |||
1706 1707 1708 1709 1710 1711 1712 | } int Itcl_ExecMethod( void *clientData, Tcl_Interp *interp, | | | | 1706 1707 1708 1709 1710 1711 1712 1713 1714 1715 1716 1717 1718 1719 1720 1721 1722 1723 | } int Itcl_ExecMethod( void *clientData, Tcl_Interp *interp, ItclSizeT objc, Tcl_Obj *const *objv) { return Tcl_NRCallObjProc2(interp, NRExecMethod, clientData, objc, objv); } /* * ------------------------------------------------------------------------ * Itcl_ExecProc() * |
︙ | ︙ | |||
1731 1732 1733 1734 1735 1736 1737 | * the most-specific class scope. * ------------------------------------------------------------------------ */ static int NRExecProc( void *clientData, /* proc definition */ Tcl_Interp *interp, /* current interpreter */ | | | 1731 1732 1733 1734 1735 1736 1737 1738 1739 1740 1741 1742 1743 1744 1745 | * the most-specific class scope. * ------------------------------------------------------------------------ */ static int NRExecProc( void *clientData, /* proc definition */ Tcl_Interp *interp, /* current interpreter */ ItclSizeT objc, /* number of arguments */ Tcl_Obj *const objv[]) /* argument objects */ { ItclMemberFunc *imPtr = (ItclMemberFunc*)clientData; int result = TCL_OK; ItclShowArgs(1, "NRExecProc", objc, objv); |
︙ | ︙ | |||
1794 1795 1796 1797 1798 1799 1800 | } int Itcl_ExecProc( void *clientData, Tcl_Interp *interp, | | | | | 1794 1795 1796 1797 1798 1799 1800 1801 1802 1803 1804 1805 1806 1807 1808 1809 1810 1811 1812 1813 1814 1815 1816 1817 1818 1819 1820 1821 1822 | } int Itcl_ExecProc( void *clientData, Tcl_Interp *interp, ItclSizeT objc, Tcl_Obj *const *objv) { return Tcl_NRCallObjProc2(interp, NRExecProc, clientData, objc, objv); } static int CallInvokeMethodIfExists( void *data[], Tcl_Interp *interp, int result) { ItclClass *iclsPtr = (ItclClass *)data[0]; ItclObject *contextObj = (ItclObject *)data[1]; ItclSizeT objc = PTR2INT(data[2]); Tcl_Obj *const *objv = (Tcl_Obj *const *)data[3]; result = Itcl_InvokeMethodIfExists(interp, "constructor", iclsPtr, contextObj, objc, (Tcl_Obj* const*)objv); if (result != TCL_OK) { return TCL_ERROR; |
︙ | ︙ | |||
1900 1901 1902 1903 1904 1905 1906 | return result; } int ItclConstructGuts( ItclObject *contextObj, Tcl_Interp *interp, | | | 1900 1901 1902 1903 1904 1905 1906 1907 1908 1909 1910 1911 1912 1913 1914 | return result; } int ItclConstructGuts( ItclObject *contextObj, Tcl_Interp *interp, ItclSizeT objc, Tcl_Obj *const objv[]) { ItclClass *contextClass; /* Ignore syntax error */ if (objc != 3) { return TCL_OK; |
︙ | ︙ |
Changes to generic/itclObject.c.
︙ | ︙ | |||
195 196 197 198 199 200 201 | * ------------------------------------------------------------------------ */ int ItclCreateObject( Tcl_Interp *interp, /* interpreter mananging new object */ const char* name, /* name of new object */ ItclClass *iclsPtr, /* class for new object */ | | | 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 | * ------------------------------------------------------------------------ */ int ItclCreateObject( Tcl_Interp *interp, /* interpreter mananging new object */ const char* name, /* name of new object */ ItclClass *iclsPtr, /* class for new object */ ItclSizeT objc, /* number of arguments */ Tcl_Obj *const objv[]) /* argument objects */ { int result = TCL_OK; Tcl_DString buffer; Tcl_CmdInfo cmdInfo; Tcl_Command cmdPtr; |
︙ | ︙ | |||
627 628 629 630 631 632 633 | /* * This is an inelegant hack, left behind until the need for it * can be eliminated by getting the inheritance tree right. */ if (iclsPtr->flags & (ITCL_ECLASS|ITCL_TYPE|ITCL_WIDGET|ITCL_WIDGETADAPTOR)) { | | | 627 628 629 630 631 632 633 634 635 636 637 638 639 640 641 | /* * This is an inelegant hack, left behind until the need for it * can be eliminated by getting the inheritance tree right. */ if (iclsPtr->flags & (ITCL_ECLASS|ITCL_TYPE|ITCL_WIDGET|ITCL_WIDGETADAPTOR)) { Tcl_NewInstanceMethod2(interp, ioPtr->oPtr, Tcl_NewStringObj("unknown", -1), 0, &itclRootMethodType, (void *)ItclUnknownGuts); } if (iclsPtr->flags & (ITCL_TYPE|ITCL_WIDGETADAPTOR)) { Tcl_Obj *objPtr = Tcl_NewObj(); Tcl_GetCommandFullName(interp, ioPtr->accessCmd, objPtr); |
︙ | ︙ | |||
2714 2715 2716 2717 2718 2719 2720 | void *data[], Tcl_Interp *interp, int result) { Tcl_Object *oPtr = (Tcl_Object *)data[0]; Tcl_Class clsPtr = (Tcl_Class)data[1]; Tcl_Obj *const *objv = (Tcl_Obj *const *)data[3]; | | | | 2714 2715 2716 2717 2718 2719 2720 2721 2722 2723 2724 2725 2726 2727 2728 2729 2730 2731 2732 2733 2734 2735 2736 2737 2738 2739 2740 2741 2742 | void *data[], Tcl_Interp *interp, int result) { Tcl_Object *oPtr = (Tcl_Object *)data[0]; Tcl_Class clsPtr = (Tcl_Class)data[1]; Tcl_Obj *const *objv = (Tcl_Obj *const *)data[3]; ItclSizeT objc = PTR2INT(data[2]); ItclShowArgs(1, "CallPublicObjectCmd", objc, objv); result = Itcl_PublicObjectCmd(oPtr, interp, clsPtr, objc, objv); ItclShowArgs(1, "CallPublicObjectCmd DONE", objc, objv); return result; } int ItclObjectCmd( void *clientData, Tcl_Interp *interp, Tcl_Object oPtr, Tcl_Class clsPtr, ItclSizeT objc, Tcl_Obj *const *objv) { Tcl_Obj *methodNamePtr; Tcl_Obj **newObjv; Tcl_DString buffer; Tcl_Obj *myPtr; ItclMemberFunc *imPtr; |
︙ | ︙ |
Changes to generic/itclParse.c.
︙ | ︙ | |||
116 117 118 119 120 121 122 | * FORWARD DECLARATIONS */ static Tcl_CmdDeleteProc ItclFreeParserCommandData; static void ItclDelObjectInfo(char* cdata); static int ItclInitClassCommon(Tcl_Interp *interp, ItclClass *iclsPtr, ItclVariable *ivPtr, const char *initStr); | | | | | | | | | | | | | | | | | | 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 | * FORWARD DECLARATIONS */ static Tcl_CmdDeleteProc ItclFreeParserCommandData; static void ItclDelObjectInfo(char* cdata); static int ItclInitClassCommon(Tcl_Interp *interp, ItclClass *iclsPtr, ItclVariable *ivPtr, const char *initStr); static Tcl_ObjCmdProc2 Itcl_ClassTypeVariableCmd; static Tcl_ObjCmdProc2 Itcl_ClassTypeMethodCmd; static Tcl_ObjCmdProc2 Itcl_ClassFilterCmd; static Tcl_ObjCmdProc2 Itcl_ClassMixinCmd; static Tcl_ObjCmdProc2 Itcl_WidgetCmd; static Tcl_ObjCmdProc2 Itcl_WidgetAdaptorCmd; static Tcl_ObjCmdProc2 Itcl_ClassComponentCmd; static Tcl_ObjCmdProc2 Itcl_ClassTypeComponentCmd; static Tcl_ObjCmdProc2 Itcl_ClassDelegateMethodCmd; static Tcl_ObjCmdProc2 Itcl_ClassDelegateOptionCmd; static Tcl_ObjCmdProc2 Itcl_ClassDelegateTypeMethodCmd; static Tcl_ObjCmdProc2 Itcl_ClassForwardCmd; static Tcl_ObjCmdProc2 Itcl_ClassMethodVariableCmd; static Tcl_ObjCmdProc2 Itcl_ClassTypeConstructorCmd; static Tcl_ObjCmdProc2 ItclGenericClassCmd; static const struct { const char *name; Tcl_ObjCmdProc2 *objProc; } parseCmds[] = { {"common", Itcl_ClassCommonCmd}, {"component", Itcl_ClassComponentCmd}, {"constructor", Itcl_ClassConstructorCmd}, {"destructor", Itcl_ClassDestructorCmd}, {"filter", Itcl_ClassFilterCmd}, {"forward", Itcl_ClassForwardCmd}, |
︙ | ︙ | |||
161 162 163 164 165 166 167 | {"variable", Itcl_ClassVariableCmd}, {"widgetclass", Itcl_ClassWidgetClassCmd}, {NULL, NULL} }; static const struct { const char *name; | | | 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 | {"variable", Itcl_ClassVariableCmd}, {"widgetclass", Itcl_ClassWidgetClassCmd}, {NULL, NULL} }; static const struct { const char *name; Tcl_ObjCmdProc2 *objProc; int protection; } protectionCmds[] = { {"private", Itcl_ClassProtectionCmd, ITCL_PRIVATE}, {"protected", Itcl_ClassProtectionCmd, ITCL_PROTECTED}, {"public", Itcl_ClassProtectionCmd, ITCL_PUBLIC}, {NULL, NULL, 0} }; |
︙ | ︙ | |||
211 212 213 214 215 216 217 | /* * Add commands for parsing class definitions. */ Tcl_DStringInit(&buffer); for (i=0 ; parseCmds[i].name ; i++) { Tcl_DStringAppend(&buffer, "::itcl::parser::", 16); Tcl_DStringAppend(&buffer, parseCmds[i].name, -1); | | | | | | | 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 | /* * Add commands for parsing class definitions. */ Tcl_DStringInit(&buffer); for (i=0 ; parseCmds[i].name ; i++) { Tcl_DStringAppend(&buffer, "::itcl::parser::", 16); Tcl_DStringAppend(&buffer, parseCmds[i].name, -1); Tcl_CreateObjCommand2(interp, Tcl_DStringValue(&buffer), parseCmds[i].objProc, infoPtr, NULL); Tcl_DStringFree(&buffer); } for (i=0 ; protectionCmds[i].name ; i++) { Tcl_DStringAppend(&buffer, "::itcl::parser::", 16); Tcl_DStringAppend(&buffer, protectionCmds[i].name, -1); pInfoPtr = (ProtectionCmdInfo*)ckalloc(sizeof(ProtectionCmdInfo)); pInfoPtr->pLevel = protectionCmds[i].protection; pInfoPtr->infoPtr = infoPtr; Tcl_CreateObjCommand2(interp, Tcl_DStringValue(&buffer), protectionCmds[i].objProc, pInfoPtr, (Tcl_CmdDeleteProc*) ItclFreeParserCommandData); Tcl_DStringFree(&buffer); } /* * Set the runtime variable resolver for the parser namespace, * to control access to "common" data members while parsing * the class definition. */ if (infoPtr->useOldResolvers) { ItclSetParserResolver(parserNs); } /* * Install the "class" command for defining new classes. */ Tcl_CreateObjCommand2(interp, "::itcl::class", Itcl_ClassCmd, infoPtr, Itcl_ReleaseData); Itcl_PreserveData(infoPtr); Tcl_CreateObjCommand2(interp, "::itcl::body", Itcl_BodyCmd, NULL, NULL); Tcl_CreateObjCommand2(interp, "::itcl::configbody", Itcl_ConfigBodyCmd, NULL, NULL); Itcl_EventuallyFree(infoPtr, (Tcl_FreeProc *) ItclDelObjectInfo); /* * Create the "itcl::find" command for high-level queries. */ |
︙ | ︙ | |||
333 334 335 336 337 338 339 | } Itcl_PreserveData(infoPtr); /* * Add "code" and "scope" commands for handling scoped values. */ | | | | 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 | } Itcl_PreserveData(infoPtr); /* * Add "code" and "scope" commands for handling scoped values. */ Tcl_CreateObjCommand2(interp, "::itcl::code", Itcl_CodeCmd, NULL, NULL); Tcl_CreateObjCommand2(interp, "::itcl::scope", Itcl_ScopeCmd, NULL, NULL); /* * Add the "filter" commands (add/delete) */ if (Itcl_CreateEnsemble(interp, "::itcl::filter") != TCL_OK) { return TCL_ERROR; |
︙ | ︙ | |||
424 425 426 427 428 429 430 | } if (Itcl_AddEnsemblePart(interp, "::itcl::import::stub", "exists", "name", Itcl_StubExistsCmd, NULL, NULL) != TCL_OK) { return TCL_ERROR; } | | > > > > > > > > | | < < < < < < < < | | | | > > > > | < < < < | | 424 425 426 427 428 429 430 431 432 433 434 435 436 437 438 439 440 441 442 443 444 445 446 447 448 449 450 451 452 453 454 455 456 457 458 459 460 461 462 463 464 465 466 467 468 469 470 471 472 473 474 475 476 477 478 479 480 481 482 483 484 485 | } if (Itcl_AddEnsemblePart(interp, "::itcl::import::stub", "exists", "name", Itcl_StubExistsCmd, NULL, NULL) != TCL_OK) { return TCL_ERROR; } Tcl_CreateObjCommand2(interp, "::itcl::type", Itcl_TypeClassCmd, infoPtr, Itcl_ReleaseData); Itcl_PreserveData(infoPtr); Tcl_CreateObjCommand2(interp, "::itcl::widget", Itcl_WidgetCmd, infoPtr, Itcl_ReleaseData); Itcl_PreserveData(infoPtr); Tcl_CreateObjCommand2(interp, "::itcl::widgetadaptor", Itcl_WidgetAdaptorCmd, infoPtr, Itcl_ReleaseData); Itcl_PreserveData(infoPtr); Tcl_CreateObjCommand2(interp, "::itcl::nwidget", Itcl_NWidgetCmd, infoPtr, Itcl_ReleaseData); Itcl_PreserveData(infoPtr); Tcl_CreateObjCommand2(interp, "::itcl::addoption", Itcl_AddOptionCmd, infoPtr, Itcl_ReleaseData); Itcl_PreserveData(infoPtr); Tcl_CreateObjCommand2(interp, "::itcl::addobjectoption", Itcl_AddObjectOptionCmd, infoPtr, Itcl_ReleaseData); Itcl_PreserveData(infoPtr); Tcl_CreateObjCommand2(interp, "::itcl::adddelegatedoption", Itcl_AddDelegatedOptionCmd, infoPtr, Itcl_ReleaseData); Itcl_PreserveData(infoPtr); Tcl_CreateObjCommand2(interp, "::itcl::adddelegatedmethod", Itcl_AddDelegatedFunctionCmd, infoPtr, Itcl_ReleaseData); Itcl_PreserveData(infoPtr); Tcl_CreateObjCommand2(interp, "::itcl::addcomponent", Itcl_AddComponentCmd, infoPtr, Itcl_ReleaseData); Itcl_PreserveData(infoPtr); Tcl_CreateObjCommand2(interp, "::itcl::setcomponent", Itcl_SetComponentCmd, infoPtr, Itcl_ReleaseData); Itcl_PreserveData(infoPtr); Tcl_CreateObjCommand2(interp, "::itcl::extendedclass", Itcl_ExtendedClassCmd, infoPtr, Itcl_ReleaseData); Itcl_PreserveData(infoPtr); Tcl_CreateObjCommand2(interp, ITCL_COMMANDS_NAMESPACE "::genericclass", ItclGenericClassCmd, infoPtr, Itcl_ReleaseData); Itcl_PreserveData(infoPtr); /* * Add the "delegate" (method/option) commands. */ if (Itcl_CreateEnsemble(interp, "::itcl::parser::delegate") != TCL_OK) { |
︙ | ︙ | |||
539 540 541 542 543 544 545 | * * ------------------------------------------------------------------------ */ static int ItclGenericClassCmd( void *clientData, /* info for all known objects */ Tcl_Interp *interp, /* current interpreter */ | | | 539 540 541 542 543 544 545 546 547 548 549 550 551 552 553 | * * ------------------------------------------------------------------------ */ static int ItclGenericClassCmd( void *clientData, /* info for all known objects */ Tcl_Interp *interp, /* current interpreter */ ItclSizeT objc, /* number of arguments */ Tcl_Obj *const objv[]) /* argument objects */ { Tcl_Obj *namePtr; Tcl_HashEntry *hPtr; ItclObjectInfo *infoPtr; ItclClass *iclsPtr; ItclComponent *icPtr; |
︙ | ︙ | |||
613 614 615 616 617 618 619 | * * ------------------------------------------------------------------------ */ int Itcl_ClassCmd( void *clientData, /* info for all known objects */ Tcl_Interp *interp, /* current interpreter */ | | | | | | | | | 613 614 615 616 617 618 619 620 621 622 623 624 625 626 627 628 629 630 631 632 633 634 635 636 637 638 639 640 641 642 643 644 645 646 647 648 649 650 651 652 653 | * * ------------------------------------------------------------------------ */ int Itcl_ClassCmd( void *clientData, /* info for all known objects */ Tcl_Interp *interp, /* current interpreter */ ItclSizeT objc, /* number of arguments */ Tcl_Obj *const objv[]) /* argument objects */ { return ItclClassBaseCmd(clientData, interp, ITCL_CLASS, objc, objv, NULL); } /* * ------------------------------------------------------------------------ * ItclClassBaseCmd() * * ------------------------------------------------------------------------ */ static Tcl_MethodCallProc2 ObjCallProc; static Tcl_MethodCallProc2 ArgCallProc; static Tcl_CloneProc CloneProc; static const Tcl_MethodType2 itclObjMethodType = { TCL_OO_METHOD_VERSION_2, "itcl objv method", ObjCallProc, Itcl_ReleaseData, CloneProc }; static const Tcl_MethodType2 itclArgMethodType = { TCL_OO_METHOD_VERSION_2, "itcl argv method", ArgCallProc, Itcl_ReleaseData, CloneProc }; static int |
︙ | ︙ | |||
675 676 677 678 679 680 681 | } static int ObjCallProc( void *clientData, Tcl_Interp *interp, Tcl_ObjectContext context, | | | 675 676 677 678 679 680 681 682 683 684 685 686 687 688 689 | } static int ObjCallProc( void *clientData, Tcl_Interp *interp, Tcl_ObjectContext context, ItclSizeT objc, Tcl_Obj *const *objv) { ItclMemberFunc *imPtr = (ItclMemberFunc *)clientData; if (TCL_ERROR == ItclCheckCallMethod(clientData, interp, context, NULL, NULL)) { return TCL_ERROR; |
︙ | ︙ | |||
700 701 702 703 704 705 706 | } static int ArgCallProc( TCL_UNUSED(void *), TCL_UNUSED(Tcl_Interp *), TCL_UNUSED(Tcl_ObjectContext), | | | | 700 701 702 703 704 705 706 707 708 709 710 711 712 713 714 715 716 717 718 719 720 721 722 723 724 725 726 | } static int ArgCallProc( TCL_UNUSED(void *), TCL_UNUSED(Tcl_Interp *), TCL_UNUSED(Tcl_ObjectContext), TCL_UNUSED(ItclSizeT), TCL_UNUSED(Tcl_Obj *const *)) { return TCL_ERROR; } int ItclClassBaseCmd( void *clientData, /* info for all known objects */ Tcl_Interp *interp, /* current interpreter */ int flags, /* flags: ITCL_CLASS, ITCL_TYPE, * ITCL_WIDGET or ITCL_WIDGETADAPTOR */ ItclSizeT objc, /* number of arguments */ Tcl_Obj *const objv[], /* argument objects */ ItclClass **iclsPtrPtr) /* for returning iclsPtr */ { Tcl_Obj *argumentPtr; Tcl_Obj *bodyPtr; FOREACH_HASH_DECLS; Tcl_HashEntry *hPtr2; |
︙ | ︙ | |||
875 876 877 878 879 880 881 | void *pmPtr; argumentPtr = imPtr->codePtr->argumentPtr; bodyPtr = imPtr->codePtr->bodyPtr; if (imPtr->codePtr->flags & ITCL_IMPLEMENT_OBJCMD) { /* Implementation of this member is coded in C expecting Tcl_Obj */ | | | | | 875 876 877 878 879 880 881 882 883 884 885 886 887 888 889 890 891 892 893 894 895 896 897 898 899 900 901 902 | void *pmPtr; argumentPtr = imPtr->codePtr->argumentPtr; bodyPtr = imPtr->codePtr->bodyPtr; if (imPtr->codePtr->flags & ITCL_IMPLEMENT_OBJCMD) { /* Implementation of this member is coded in C expecting Tcl_Obj */ imPtr->tmPtr = Tcl_NewMethod2(interp, iclsPtr->clsPtr, imPtr->namePtr, 1, &itclObjMethodType, imPtr); Itcl_PreserveData(imPtr); if (iclsPtr->flags & (ITCL_TYPE|ITCL_WIDGET|ITCL_WIDGETADAPTOR)) { imPtr->tmPtr = Tcl_NewInstanceMethod2(interp, iclsPtr->oPtr, imPtr->namePtr, 1, &itclObjMethodType, imPtr); Itcl_PreserveData(imPtr); } } else if (imPtr->codePtr->flags & ITCL_IMPLEMENT_ARGCMD) { /* Implementation of this member is coded in C expecting (char *) */ imPtr->tmPtr = Tcl_NewMethod2(interp, iclsPtr->clsPtr, imPtr->namePtr, 1, &itclArgMethodType, imPtr); Itcl_PreserveData(imPtr); } else { |
︙ | ︙ | |||
1082 1083 1084 1085 1086 1087 1088 | imPtr->tmPtr = Itcl_NewProcMethod(interp, iclsPtr->oPtr, ItclCheckCallMethod, ItclAfterCallMethod, ItclProcErrorProc, imPtr, imPtr->namePtr, argumentPtr, bodyPtr, &pmPtr); } } if ((imPtr->flags & ITCL_COMMON) == 0) { | | | | 1082 1083 1084 1085 1086 1087 1088 1089 1090 1091 1092 1093 1094 1095 1096 1097 1098 1099 1100 1101 | imPtr->tmPtr = Itcl_NewProcMethod(interp, iclsPtr->oPtr, ItclCheckCallMethod, ItclAfterCallMethod, ItclProcErrorProc, imPtr, imPtr->namePtr, argumentPtr, bodyPtr, &pmPtr); } } if ((imPtr->flags & ITCL_COMMON) == 0) { imPtr->accessCmd = Tcl_CreateObjCommand2(interp, Tcl_GetString(imPtr->fullNamePtr), Itcl_ExecMethod, imPtr, Itcl_ReleaseData); Itcl_PreserveData(imPtr); } else { imPtr->accessCmd = Tcl_CreateObjCommand2(interp, Tcl_GetString(imPtr->fullNamePtr), Itcl_ExecProc, imPtr, Itcl_ReleaseData); Itcl_PreserveData(imPtr); } } if (iclsPtr->flags & (ITCL_TYPE|ITCL_WIDGETADAPTOR)) { /* initialize the typecomponents and typevariables */ |
︙ | ︙ | |||
1280 1281 1282 1283 1284 1285 1286 | * * ------------------------------------------------------------------------ */ int Itcl_ClassInheritCmd( void *clientData, /* info for all known objects */ Tcl_Interp *interp, /* current interpreter */ | | | 1280 1281 1282 1283 1284 1285 1286 1287 1288 1289 1290 1291 1292 1293 1294 | * * ------------------------------------------------------------------------ */ int Itcl_ClassInheritCmd( void *clientData, /* info for all known objects */ Tcl_Interp *interp, /* current interpreter */ ItclSizeT objc, /* number of arguments */ Tcl_Obj *const objv[]) /* argument objects */ { ItclObjectInfo *infoPtr = (ItclObjectInfo*)clientData; ItclClass *iclsPtr = (ItclClass*)Itcl_PeekStack(&infoPtr->clsStack); int result; ItclSizeT i; int newEntry; |
︙ | ︙ | |||
1563 1564 1565 1566 1567 1568 1569 | * Returns TCL_OK/TCL_ERROR to indicate success/failure. * ------------------------------------------------------------------------ */ int Itcl_ClassProtectionCmd( void *clientData, /* protection level (public/protected/private) */ Tcl_Interp *interp, /* current interpreter */ | | | 1563 1564 1565 1566 1567 1568 1569 1570 1571 1572 1573 1574 1575 1576 1577 | * Returns TCL_OK/TCL_ERROR to indicate success/failure. * ------------------------------------------------------------------------ */ int Itcl_ClassProtectionCmd( void *clientData, /* protection level (public/protected/private) */ Tcl_Interp *interp, /* current interpreter */ ItclSizeT objc, /* number of arguments */ Tcl_Obj *const objv[]) /* argument objects */ { ProtectionCmdInfo *pInfo = (ProtectionCmdInfo*)clientData; int result; int oldLevel; ItclShowArgs(2, "Itcl_ClassProtectionCmd", objc, objv); |
︙ | ︙ | |||
1640 1641 1642 1643 1644 1645 1646 | * * ------------------------------------------------------------------------ */ int Itcl_ClassConstructorCmd( void *clientData, /* info for all known objects */ Tcl_Interp *interp, /* current interpreter */ | | | 1640 1641 1642 1643 1644 1645 1646 1647 1648 1649 1650 1651 1652 1653 1654 | * * ------------------------------------------------------------------------ */ int Itcl_ClassConstructorCmd( void *clientData, /* info for all known objects */ Tcl_Interp *interp, /* current interpreter */ ItclSizeT objc, /* number of arguments */ Tcl_Obj *const objv[]) /* argument objects */ { ItclObjectInfo *infoPtr = (ItclObjectInfo*)clientData; ItclClass *iclsPtr = (ItclClass*)Itcl_PeekStack(&infoPtr->clsStack); Tcl_Obj *namePtr; char *arglist; char *body; |
︙ | ︙ | |||
1706 1707 1708 1709 1710 1711 1712 | * * ------------------------------------------------------------------------ */ int Itcl_ClassDestructorCmd( void *clientData, /* info for all known objects */ Tcl_Interp *interp, /* current interpreter */ | | | 1706 1707 1708 1709 1710 1711 1712 1713 1714 1715 1716 1717 1718 1719 1720 | * * ------------------------------------------------------------------------ */ int Itcl_ClassDestructorCmd( void *clientData, /* info for all known objects */ Tcl_Interp *interp, /* current interpreter */ ItclSizeT objc, /* number of arguments */ Tcl_Obj *const objv[]) /* argument objects */ { ItclObjectInfo *infoPtr = (ItclObjectInfo*)clientData; ItclClass *iclsPtr = (ItclClass*)Itcl_PeekStack(&infoPtr->clsStack); Tcl_Obj *namePtr; char *body; |
︙ | ︙ | |||
1760 1761 1762 1763 1764 1765 1766 | * * ------------------------------------------------------------------------ */ int Itcl_ClassMethodCmd( void *clientData, /* info for all known objects */ Tcl_Interp *interp, /* current interpreter */ | | | 1760 1761 1762 1763 1764 1765 1766 1767 1768 1769 1770 1771 1772 1773 1774 | * * ------------------------------------------------------------------------ */ int Itcl_ClassMethodCmd( void *clientData, /* info for all known objects */ Tcl_Interp *interp, /* current interpreter */ ItclSizeT objc, /* number of arguments */ Tcl_Obj *const objv[]) /* argument objects */ { Tcl_Obj *namePtr; Tcl_HashEntry *hPtr; ItclObjectInfo *infoPtr = (ItclObjectInfo*)clientData; ItclClass *iclsPtr = (ItclClass*)Itcl_PeekStack(&infoPtr->clsStack); char *arglist; |
︙ | ︙ | |||
1823 1824 1825 1826 1827 1828 1829 | * * ------------------------------------------------------------------------ */ int Itcl_ClassProcCmd( void *clientData, /* info for all known objects */ Tcl_Interp *interp, /* current interpreter */ | | | 1823 1824 1825 1826 1827 1828 1829 1830 1831 1832 1833 1834 1835 1836 1837 | * * ------------------------------------------------------------------------ */ int Itcl_ClassProcCmd( void *clientData, /* info for all known objects */ Tcl_Interp *interp, /* current interpreter */ ItclSizeT objc, /* number of arguments */ Tcl_Obj *const objv[]) /* argument objects */ { FOREACH_HASH_DECLS; Tcl_Obj *namePtr; ItclObjectInfo *infoPtr; ItclClass *iclsPtr; ItclDelegatedFunction *idmPtr; |
︙ | ︙ | |||
1894 1895 1896 1897 1898 1899 1900 | * * ------------------------------------------------------------------------ */ static int Itcl_ClassTypeMethodCmd( void *clientData, /* info for all known objects */ Tcl_Interp *interp, /* current interpreter */ | | | 1894 1895 1896 1897 1898 1899 1900 1901 1902 1903 1904 1905 1906 1907 1908 | * * ------------------------------------------------------------------------ */ static int Itcl_ClassTypeMethodCmd( void *clientData, /* info for all known objects */ Tcl_Interp *interp, /* current interpreter */ ItclSizeT objc, /* number of arguments */ Tcl_Obj *const objv[]) /* argument objects */ { FOREACH_HASH_DECLS; Tcl_Obj *namePtr; ItclObjectInfo *infoPtr; ItclClass *iclsPtr; ItclDelegatedFunction *idmPtr; |
︙ | ︙ | |||
1970 1971 1972 1973 1974 1975 1976 | * * ------------------------------------------------------------------------ */ int Itcl_ClassVariableCmd( void *clientData, /* info for all known objects */ Tcl_Interp *interp, /* current interpreter */ | | | 1970 1971 1972 1973 1974 1975 1976 1977 1978 1979 1980 1981 1982 1983 1984 | * * ------------------------------------------------------------------------ */ int Itcl_ClassVariableCmd( void *clientData, /* info for all known objects */ Tcl_Interp *interp, /* current interpreter */ ItclSizeT objc, /* number of arguments */ Tcl_Obj *const objv[]) /* argument objects */ { Tcl_Obj *namePtr; ItclObjectInfo *infoPtr = (ItclObjectInfo*)clientData; ItclClass *iclsPtr = (ItclClass*)Itcl_PeekStack(&infoPtr->clsStack); ItclVariable *ivPtr; char *init; |
︙ | ︙ | |||
2194 2195 2196 2197 2198 2199 2200 | * * ------------------------------------------------------------------------ */ static int ItclClassCommonCmd( void *clientData, /* info for all known objects */ Tcl_Interp *interp, /* current interpreter */ | | | 2194 2195 2196 2197 2198 2199 2200 2201 2202 2203 2204 2205 2206 2207 2208 | * * ------------------------------------------------------------------------ */ static int ItclClassCommonCmd( void *clientData, /* info for all known objects */ Tcl_Interp *interp, /* current interpreter */ ItclSizeT objc, /* number of arguments */ Tcl_Obj *const objv[], /* argument objects */ int protection, ItclVariable **ivPtrPtr) { ItclObjectInfo *infoPtr = (ItclObjectInfo*)clientData; ItclClass *iclsPtr = (ItclClass*)Itcl_PeekStack(&infoPtr->clsStack); ItclVariable *ivPtr; |
︙ | ︙ | |||
2299 2300 2301 2302 2303 2304 2305 | * * ------------------------------------------------------------------------ */ static int Itcl_ClassTypeVariableCmd( void *clientData, /* info for all known objects */ Tcl_Interp *interp, /* current interpreter */ | | | 2299 2300 2301 2302 2303 2304 2305 2306 2307 2308 2309 2310 2311 2312 2313 | * * ------------------------------------------------------------------------ */ static int Itcl_ClassTypeVariableCmd( void *clientData, /* info for all known objects */ Tcl_Interp *interp, /* current interpreter */ ItclSizeT objc, /* number of arguments */ Tcl_Obj *const objv[]) /* argument objects */ { ItclVariable *ivPtr; int result; ivPtr = NULL; ItclShowArgs(1, "Itcl_ClassTypeVariableCmd", objc, objv); |
︙ | ︙ | |||
2332 2333 2334 2335 2336 2337 2338 | * * ------------------------------------------------------------------------ */ int Itcl_ClassCommonCmd( void *clientData, /* info for all known objects */ Tcl_Interp *interp, /* current interpreter */ | | | | | 2332 2333 2334 2335 2336 2337 2338 2339 2340 2341 2342 2343 2344 2345 2346 2347 2348 2349 2350 2351 2352 2353 2354 2355 2356 2357 2358 2359 2360 2361 2362 2363 | * * ------------------------------------------------------------------------ */ int Itcl_ClassCommonCmd( void *clientData, /* info for all known objects */ Tcl_Interp *interp, /* current interpreter */ ItclSizeT objc, /* number of arguments */ Tcl_Obj *const objv[]) /* argument objects */ { ItclVariable *ivPtr; ItclShowArgs(2, "Itcl_ClassTypeVariableCmd", objc, objv); return ItclClassCommonCmd(clientData, interp, objc, objv, 0, &ivPtr); } /* * ------------------------------------------------------------------------ * ItclFreeParserCommandData() * * This callback will free() up memory dynamically allocated * and passed as the ClientData argument to Tcl_CreateObjCommand2. * This callback is required because one can not simply pass * a pointer to the free() or ckfree() to Tcl_CreateObjCommand2. * ------------------------------------------------------------------------ */ static void ItclFreeParserCommandData( void *cdata) /* client data to be destroyed */ { ckfree(cdata); |
︙ | ︙ | |||
2415 2416 2417 2418 2419 2420 2421 | * * ------------------------------------------------------------------------ */ static int Itcl_ClassFilterCmd( void *clientData, /* info for all known objects */ Tcl_Interp *interp, /* current interpreter */ | | | 2415 2416 2417 2418 2419 2420 2421 2422 2423 2424 2425 2426 2427 2428 2429 | * * ------------------------------------------------------------------------ */ static int Itcl_ClassFilterCmd( void *clientData, /* info for all known objects */ Tcl_Interp *interp, /* current interpreter */ ItclSizeT objc, /* number of arguments */ Tcl_Obj *const objv[]) /* argument objects */ { Tcl_Obj **newObjv; ItclObjectInfo *infoPtr; ItclClass *iclsPtr; int result; |
︙ | ︙ | |||
2469 2470 2471 2472 2473 2474 2475 | * * ------------------------------------------------------------------------ */ static int Itcl_ClassMixinCmd( TCL_UNUSED(void *), /* info for all known objects */ TCL_UNUSED(Tcl_Interp *),/* current interpreter */ | | | | 2469 2470 2471 2472 2473 2474 2475 2476 2477 2478 2479 2480 2481 2482 2483 2484 2485 2486 2487 2488 2489 2490 2491 2492 2493 2494 2495 2496 2497 2498 2499 2500 2501 2502 2503 2504 | * * ------------------------------------------------------------------------ */ static int Itcl_ClassMixinCmd( TCL_UNUSED(void *), /* info for all known objects */ TCL_UNUSED(Tcl_Interp *),/* current interpreter */ ItclSizeT objc, /* number of arguments */ Tcl_Obj *const *objv) /* argument objects */ { ItclShowArgs(0, "Itcl_ClassMixinCmd", objc, objv); return TCL_OK; } /* * ------------------------------------------------------------------------ * Itcl_WidgetCmd() * * that is just a dummy command to load package ItclWidget * and then to resend the command and execute it in that package * package ItclWidget is renaming the Tcl command!! * * ------------------------------------------------------------------------ */ static int Itcl_WidgetCmd( void *clientData, /* info for all known objects */ Tcl_Interp *interp, /* current interpreter */ ItclSizeT objc, /* number of arguments */ Tcl_Obj *const objv[]) /* argument objects */ { ItclObjectInfo *infoPtr; int result; ItclShowArgs(1, "Itcl_WidgetCmd", objc-1, objv); infoPtr = (ItclObjectInfo *)clientData; |
︙ | ︙ | |||
2522 2523 2524 2525 2526 2527 2528 | * * ------------------------------------------------------------------------ */ static int Itcl_WidgetAdaptorCmd( void *clientData, /* info for all known objects */ Tcl_Interp *interp, /* current interpreter */ | | | 2522 2523 2524 2525 2526 2527 2528 2529 2530 2531 2532 2533 2534 2535 2536 | * * ------------------------------------------------------------------------ */ static int Itcl_WidgetAdaptorCmd( void *clientData, /* info for all known objects */ Tcl_Interp *interp, /* current interpreter */ ItclSizeT objc, /* number of arguments */ Tcl_Obj *const objv[]) /* argument objects */ { ItclObjectInfo *infoPtr; int result; ItclShowArgs(1, "Itcl_WidgetAdaptorCmd", objc-1, objv); infoPtr = (ItclObjectInfo *)clientData; |
︙ | ︙ | |||
2556 2557 2558 2559 2560 2561 2562 | * * ------------------------------------------------------------------------ */ int ItclParseOption( TCL_UNUSED(ItclObjectInfo *), /* info for all known objects */ Tcl_Interp *interp, /* current interpreter */ | | | 2556 2557 2558 2559 2560 2561 2562 2563 2564 2565 2566 2567 2568 2569 2570 | * * ------------------------------------------------------------------------ */ int ItclParseOption( TCL_UNUSED(ItclObjectInfo *), /* info for all known objects */ Tcl_Interp *interp, /* current interpreter */ ItclSizeT objc, /* number of arguments */ Tcl_Obj *const objv[], /* argument objects */ ItclClass *iclsPtr, ItclObject *ioPtr, ItclOption **ioptPtrPtr) /* where the otpion info is found */ { Tcl_Obj *classNamePtr; Tcl_Obj *nameSpecPtr; |
︙ | ︙ | |||
2888 2889 2890 2891 2892 2893 2894 | * * ------------------------------------------------------------------------ */ int Itcl_ClassOptionCmd( void *clientData, /* info for all known objects */ Tcl_Interp *interp, /* current interpreter */ | | | 2888 2889 2890 2891 2892 2893 2894 2895 2896 2897 2898 2899 2900 2901 2902 | * * ------------------------------------------------------------------------ */ int Itcl_ClassOptionCmd( void *clientData, /* info for all known objects */ Tcl_Interp *interp, /* current interpreter */ ItclSizeT objc, /* number of arguments */ Tcl_Obj *const objv[]) /* argument objects */ { ItclOption *ioptPtr; const char *tkPackage; const char *tkVersion; ItclObjectInfo *infoPtr = (ItclObjectInfo*)clientData; ItclClass *iclsPtr = (ItclClass*)Itcl_PeekStack(&infoPtr->clsStack); |
︙ | ︙ | |||
3009 3010 3011 3012 3013 3014 3015 | * * ------------------------------------------------------------------------ */ static int ItclHandleClassComponent( void *clientData, /* info for all known objects */ Tcl_Interp *interp, /* current interpreter */ | | | 3009 3010 3011 3012 3013 3014 3015 3016 3017 3018 3019 3020 3021 3022 3023 | * * ------------------------------------------------------------------------ */ static int ItclHandleClassComponent( void *clientData, /* info for all known objects */ Tcl_Interp *interp, /* current interpreter */ ItclSizeT objc, /* number of arguments */ Tcl_Obj *const objv[], /* argument objects */ ItclComponent **icPtrPtr) { Tcl_Obj **newObjv; ItclObjectInfo *infoPtr; ItclClass *iclsPtr; ItclComponent *icPtr; |
︙ | ︙ | |||
3185 3186 3187 3188 3189 3190 3191 | * * ------------------------------------------------------------------------ */ static int Itcl_ClassComponentCmd( void *clientData, /* info for all known objects */ Tcl_Interp *interp, /* current interpreter */ | | | 3185 3186 3187 3188 3189 3190 3191 3192 3193 3194 3195 3196 3197 3198 3199 | * * ------------------------------------------------------------------------ */ static int Itcl_ClassComponentCmd( void *clientData, /* info for all known objects */ Tcl_Interp *interp, /* current interpreter */ ItclSizeT objc, /* number of arguments */ Tcl_Obj *const objv[]) /* argument objects */ { ItclComponent *icPtr; return ItclHandleClassComponent(clientData, interp, objc, objv, &icPtr); } |
︙ | ︙ | |||
3209 3210 3211 3212 3213 3214 3215 | * * ------------------------------------------------------------------------ */ static int Itcl_ClassTypeComponentCmd( void *clientData, /* info for all known objects */ Tcl_Interp *interp, /* current interpreter */ | | | 3209 3210 3211 3212 3213 3214 3215 3216 3217 3218 3219 3220 3221 3222 3223 | * * ------------------------------------------------------------------------ */ static int Itcl_ClassTypeComponentCmd( void *clientData, /* info for all known objects */ Tcl_Interp *interp, /* current interpreter */ ItclSizeT objc, /* number of arguments */ Tcl_Obj *const objv[]) /* argument objects */ { ItclComponent *icPtr; int result; ItclShowArgs(1, "Itcl_ClassTypeComponentCmd", objc, objv); result = ItclHandleClassComponent(clientData, interp, objc, objv, &icPtr); |
︙ | ︙ | |||
3303 3304 3305 3306 3307 3308 3309 | Itcl_HandleDelegateMethodCmd( Tcl_Interp *interp, /* current interpreter */ ItclObject *ioPtr, /* != NULL for ::itcl::adddelegatedmethod otherwise NULL */ ItclClass *iclsPtr, /* != NULL for delegate method otherwise NULL */ ItclDelegatedFunction **idmPtrPtr, /* where to return idoPtr */ | | | | 3303 3304 3305 3306 3307 3308 3309 3310 3311 3312 3313 3314 3315 3316 3317 3318 3319 3320 3321 3322 3323 3324 3325 3326 3327 3328 3329 3330 3331 3332 3333 3334 | Itcl_HandleDelegateMethodCmd( Tcl_Interp *interp, /* current interpreter */ ItclObject *ioPtr, /* != NULL for ::itcl::adddelegatedmethod otherwise NULL */ ItclClass *iclsPtr, /* != NULL for delegate method otherwise NULL */ ItclDelegatedFunction **idmPtrPtr, /* where to return idoPtr */ ItclSizeT objc, /* number of arguments */ Tcl_Obj *const objv[]) /* argument objects */ { Tcl_Obj *methodNamePtr; Tcl_Obj *componentPtr; Tcl_Obj *targetPtr; Tcl_Obj *usingPtr; Tcl_Obj *exceptionsPtr; Tcl_HashEntry *hPtr; ItclClass *iclsPtr2; ItclComponent *icPtr; ItclHierIter hier; const char *usageStr; const char *methodName; const char *component; const char *token; int result; ItclSizeT i; int foundOpt; ItclShowArgs(1, "Itcl_HandleDelegateMethodCmd", objc, objv); usageStr = "delegate method <methodName> to <componentName> ?as <targetName>?\n\ delegate method <methodName> ?to <componentName>? using <pattern>\n\ delegate method * ?to <componentName>? ?using <pattern>? ?except <methods>?"; if (objc < 4) { |
︙ | ︙ | |||
3478 3479 3480 3481 3482 3483 3484 | * * ------------------------------------------------------------------------ */ static int Itcl_ClassDelegateMethodCmd( void *clientData, /* info for all known objects */ Tcl_Interp *interp, /* current interpreter */ | | | 3478 3479 3480 3481 3482 3483 3484 3485 3486 3487 3488 3489 3490 3491 3492 | * * ------------------------------------------------------------------------ */ static int Itcl_ClassDelegateMethodCmd( void *clientData, /* info for all known objects */ Tcl_Interp *interp, /* current interpreter */ ItclSizeT objc, /* number of arguments */ Tcl_Obj *const objv[]) /* argument objects */ { Tcl_HashEntry *hPtr; ItclObjectInfo *infoPtr; ItclClass *iclsPtr; ItclDelegatedFunction *idmPtr; int isNew; |
︙ | ︙ | |||
3536 3537 3538 3539 3540 3541 3542 | Itcl_HandleDelegateOptionCmd( Tcl_Interp *interp, /* current interpreter */ ItclObject *ioPtr, /* != NULL for ::itcl::adddelgatedoption otherwise NULL */ ItclClass *iclsPtr, /* != NULL for delegate option otherwise NULL */ ItclDelegatedOption **idoPtrPtr, /* where to return idoPtr */ | | | 3536 3537 3538 3539 3540 3541 3542 3543 3544 3545 3546 3547 3548 3549 3550 | Itcl_HandleDelegateOptionCmd( Tcl_Interp *interp, /* current interpreter */ ItclObject *ioPtr, /* != NULL for ::itcl::adddelgatedoption otherwise NULL */ ItclClass *iclsPtr, /* != NULL for delegate option otherwise NULL */ ItclDelegatedOption **idoPtrPtr, /* where to return idoPtr */ ItclSizeT objc, /* number of arguments */ Tcl_Obj *const objv[]) /* argument objects */ { Tcl_Obj *allOptionNamePtr; Tcl_Obj *optionNamePtr; Tcl_Obj *componentPtr; Tcl_Obj *targetPtr; |
︙ | ︙ | |||
3835 3836 3837 3838 3839 3840 3841 | * * ------------------------------------------------------------------------ */ static int Itcl_ClassDelegateOptionCmd( void *clientData, /* info for all known objects */ Tcl_Interp *interp, /* current interpreter */ | | | 3835 3836 3837 3838 3839 3840 3841 3842 3843 3844 3845 3846 3847 3848 3849 | * * ------------------------------------------------------------------------ */ static int Itcl_ClassDelegateOptionCmd( void *clientData, /* info for all known objects */ Tcl_Interp *interp, /* current interpreter */ ItclSizeT objc, /* number of arguments */ Tcl_Obj *const objv[]) /* argument objects */ { Tcl_HashEntry *hPtr; ItclObjectInfo *infoPtr; ItclClass *iclsPtr; ItclDelegatedOption *idoPtr; const char *usageStr; |
︙ | ︙ | |||
3893 3894 3895 3896 3897 3898 3899 | * * ------------------------------------------------------------------------ */ static int Itcl_ClassDelegateTypeMethodCmd( void *clientData, /* info for all known objects */ Tcl_Interp *interp, /* current interpreter */ | | | 3893 3894 3895 3896 3897 3898 3899 3900 3901 3902 3903 3904 3905 3906 3907 | * * ------------------------------------------------------------------------ */ static int Itcl_ClassDelegateTypeMethodCmd( void *clientData, /* info for all known objects */ Tcl_Interp *interp, /* current interpreter */ ItclSizeT objc, /* number of arguments */ Tcl_Obj *const objv[]) /* argument objects */ { Tcl_Obj *typeMethodNamePtr; Tcl_Obj *componentPtr; Tcl_Obj *targetPtr; Tcl_Obj *usingPtr; Tcl_Obj *exceptionsPtr; |
︙ | ︙ | |||
4078 4079 4080 4081 4082 4083 4084 | * ------------------------------------------------------------------------ */ static int Itcl_ClassForwardCmd( void *clientData, /* unused */ Tcl_Interp *interp, /* current interpreter */ | | | 4078 4079 4080 4081 4082 4083 4084 4085 4086 4087 4088 4089 4090 4091 4092 | * ------------------------------------------------------------------------ */ static int Itcl_ClassForwardCmd( void *clientData, /* unused */ Tcl_Interp *interp, /* current interpreter */ ItclSizeT objc, /* number of arguments */ Tcl_Obj *const objv[]) /* argument objects */ { Tcl_Obj *prefixObj; Tcl_Method mPtr; ItclObjectInfo *infoPtr; ItclClass *iclsPtr; |
︙ | ︙ | |||
4128 4129 4130 4131 4132 4133 4134 | * ------------------------------------------------------------------------ */ static int Itcl_ClassMethodVariableCmd( void *clientData, /* unused */ Tcl_Interp *interp, /* current interpreter */ | | | 4128 4129 4130 4131 4132 4133 4134 4135 4136 4137 4138 4139 4140 4141 4142 | * ------------------------------------------------------------------------ */ static int Itcl_ClassMethodVariableCmd( void *clientData, /* unused */ Tcl_Interp *interp, /* current interpreter */ ItclSizeT objc, /* number of arguments */ Tcl_Obj *const objv[]) /* argument objects */ { Tcl_Obj *namePtr; Tcl_Obj *defaultPtr; Tcl_Obj *callbackPtr; ItclObjectInfo *infoPtr; ItclClass *iclsPtr; |
︙ | ︙ | |||
4248 4249 4250 4251 4252 4253 4254 | * * ------------------------------------------------------------------------ */ static int Itcl_ClassTypeConstructorCmd( void *clientData, /* info for all known objects */ Tcl_Interp *interp, /* current interpreter */ | | | 4248 4249 4250 4251 4252 4253 4254 4255 4256 4257 4258 4259 4260 4261 4262 | * * ------------------------------------------------------------------------ */ static int Itcl_ClassTypeConstructorCmd( void *clientData, /* info for all known objects */ Tcl_Interp *interp, /* current interpreter */ ItclSizeT objc, /* number of arguments */ Tcl_Obj *const objv[]) /* argument objects */ { ItclObjectInfo *infoPtr = (ItclObjectInfo*)clientData; ItclClass *iclsPtr = (ItclClass*)Itcl_PeekStack(&infoPtr->clsStack); Tcl_Obj *namePtr; ItclShowArgs(1, "Itcl_ClassTypeConstructorCmd", objc, objv); |
︙ | ︙ |
Changes to generic/itclStubInit.c.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 | /* * This file is (mostly) automatically generated from itcl.decls. * It is compiled and linked in with the itcl package proper. */ #include "itclInt.h" #undef Itcl_GetStackValue MODULE_SCOPE const ItclStubs itclStubs; /* !BEGIN!: Do not edit below this line. */ static const ItclIntStubs itclIntStubs = { TCL_STUB_MAGIC, ITCLINT_STUBS_EPOCH, | > > > > > | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 | /* * This file is (mostly) automatically generated from itcl.decls. * It is compiled and linked in with the itcl package proper. */ #include "itclInt.h" #undef Itcl_GetStackValue #if TCL_MAJOR_VERSION < 9 # define Itcl_RegisterObjC 0 # define Itcl_FindC 0 #endif MODULE_SCOPE const ItclStubs itclStubs; /* !BEGIN!: Do not edit below this line. */ static const ItclIntStubs itclIntStubs = { TCL_STUB_MAGIC, ITCLINT_STUBS_EPOCH, |
︙ | ︙ | |||
236 237 238 239 240 241 242 243 244 245 | Itcl_ReleaseData, /* 22 */ Itcl_SaveInterpState, /* 23 */ Itcl_RestoreInterpState, /* 24 */ Itcl_DiscardInterpState, /* 25 */ Itcl_Alloc, /* 26 */ Itcl_Free, /* 27 */ ItclGetStackValue, /* 28 */ }; /* !END!: Do not edit above this line. */ | > > | 241 242 243 244 245 246 247 248 249 250 251 252 | Itcl_ReleaseData, /* 22 */ Itcl_SaveInterpState, /* 23 */ Itcl_RestoreInterpState, /* 24 */ Itcl_DiscardInterpState, /* 25 */ Itcl_Alloc, /* 26 */ Itcl_Free, /* 27 */ ItclGetStackValue, /* 28 */ Itcl_RegisterObjC2, /* 29 */ Itcl_FindC2, /* 30 */ }; /* !END!: Do not edit above this line. */ |
Changes to generic/itclStubs.c.
︙ | ︙ | |||
10 11 12 13 14 15 16 | * this file, and for a DISCLAIMER OF ALL WARRANTIES. */ #include "itclInt.h" static void ItclDeleteStub(void *cdata); static int ItclHandleStubCmd(void *clientData, Tcl_Interp *interp, | | | 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 | * this file, and for a DISCLAIMER OF ALL WARRANTIES. */ #include "itclInt.h" static void ItclDeleteStub(void *cdata); static int ItclHandleStubCmd(void *clientData, Tcl_Interp *interp, ItclSizeT objc, Tcl_Obj *const objv[]); /* * ------------------------------------------------------------------------ * Itcl_IsStub() * * Checks the given Tcl command to see if it represents an autoloading |
︙ | ︙ | |||
60 61 62 63 64 65 66 | * the real command <name> to be autoloaded. * ------------------------------------------------------------------------ */ int Itcl_StubCreateCmd( TCL_UNUSED(void *), /* not used */ Tcl_Interp *interp, /* current interpreter */ | | | > > > > > | 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 | * the real command <name> to be autoloaded. * ------------------------------------------------------------------------ */ int Itcl_StubCreateCmd( TCL_UNUSED(void *), /* not used */ Tcl_Interp *interp, /* current interpreter */ ItclSizeT objc, /* number of arguments */ Tcl_Obj *const objv[]) /* argument objects */ { Tcl_Command cmdPtr; char *cmdName; Tcl_CmdInfo cmdInfo; ItclShowArgs(1, "Itcl_StubCreateCmd", objc, objv); if (objc != 2) { Tcl_WrongNumArgs(interp, 1, objv, "name"); return TCL_ERROR; } cmdName = Tcl_GetString(objv[1]); /* * Create a stub command with the characteristic ItclDeleteStub * procedure. That way, we can recognize this command later * on as a stub. Save the cmd token as client data, so we can * get the full name of this command later on. */ cmdPtr = Tcl_CreateObjCommand2(interp, cmdName, ItclHandleStubCmd, NULL, (Tcl_CmdDeleteProc*)ItclDeleteStub); Tcl_GetCommandInfoFromToken(cmdPtr, &cmdInfo); #if TCL_MAJOR_VERSION > 8 if (cmdInfo.isNativeObjectProc == 2) { cmdInfo.objClientData2 = cmdPtr; } else #endif cmdInfo.objClientData = cmdPtr; Tcl_SetCommandInfoFromToken(cmdPtr, &cmdInfo); return TCL_OK; } |
︙ | ︙ | |||
110 111 112 113 114 115 116 | * autoloading stub. Returns a boolean result. * ------------------------------------------------------------------------ */ int Itcl_StubExistsCmd( TCL_UNUSED(void *), /* not used */ Tcl_Interp *interp, /* current interpreter */ | | | 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 | * autoloading stub. Returns a boolean result. * ------------------------------------------------------------------------ */ int Itcl_StubExistsCmd( TCL_UNUSED(void *), /* not used */ Tcl_Interp *interp, /* current interpreter */ ItclSizeT objc, /* number of arguments */ Tcl_Obj *const objv[]) /* argument objects */ { Tcl_Command cmdPtr; char *cmdName; if (objc != 2) { Tcl_WrongNumArgs(interp, 1, objv, "name"); |
︙ | ︙ | |||
149 150 151 152 153 154 155 | * error message in the interpreter. * ------------------------------------------------------------------------ */ static int ItclHandleStubCmd( void *clientData, /* command token for this stub */ Tcl_Interp *interp, /* current interpreter */ | | | 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 | * error message in the interpreter. * ------------------------------------------------------------------------ */ static int ItclHandleStubCmd( void *clientData, /* command token for this stub */ Tcl_Interp *interp, /* current interpreter */ ItclSizeT objc, /* number of arguments */ Tcl_Obj *const objv[]) /* argument objects */ { Tcl_Command cmdPtr; Tcl_Obj **cmdlinev; Tcl_Obj *objAutoLoad[2]; Tcl_Obj *objPtr; Tcl_Obj *cmdNamePtr; |
︙ | ︙ |
Changes to generic/itclTclIntStubsFcn.c.
︙ | ︙ | |||
34 35 36 37 38 39 40 | { int code = TclCreateProc(interp, (Namespace *)nsPtr, procName, argsPtr, bodyPtr, (Proc **)procPtrPtr); (*(Proc **)procPtrPtr)->cmdPtr = NULL; return code; } | | | | 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 | { int code = TclCreateProc(interp, (Namespace *)nsPtr, procName, argsPtr, bodyPtr, (Proc **)procPtrPtr); (*(Proc **)procPtrPtr)->cmdPtr = NULL; return code; } Tcl_ObjCmdProc2 * _Tcl_GetObjInterpProc( void) { return TclGetObjInterpProc(); } void _Tcl_ProcDeleteProc( void *clientData) { TclProcDeleteProc(clientData); |
︙ | ︙ |
Changes to generic/itclTclIntStubsFcn.h.
︙ | ︙ | |||
21 22 23 24 25 26 27 | #define Tcl_GetObjInterpProc _Tcl_GetObjInterpProc MODULE_SCOPE Tcl_Command _Tcl_GetOriginalCommand(Tcl_Command command); MODULE_SCOPE int _Tcl_CreateProc(Tcl_Interp *interp, Tcl_Namespace *nsPtr, const char *procName, Tcl_Obj *argsPtr, Tcl_Obj *bodyPtr, Tcl_Proc *procPtrPtr); MODULE_SCOPE void _Tcl_ProcDeleteProc(void *clientData); | | | 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 | #define Tcl_GetObjInterpProc _Tcl_GetObjInterpProc MODULE_SCOPE Tcl_Command _Tcl_GetOriginalCommand(Tcl_Command command); MODULE_SCOPE int _Tcl_CreateProc(Tcl_Interp *interp, Tcl_Namespace *nsPtr, const char *procName, Tcl_Obj *argsPtr, Tcl_Obj *bodyPtr, Tcl_Proc *procPtrPtr); MODULE_SCOPE void _Tcl_ProcDeleteProc(void *clientData); MODULE_SCOPE Tcl_ObjCmdProc2 *_Tcl_GetObjInterpProc(void); MODULE_SCOPE int Tcl_RenameCommand(Tcl_Interp *interp, const char *oldName, const char *newName); MODULE_SCOPE Tcl_HashTable *Itcl_GetNamespaceChildTable(Tcl_Namespace *nsPtr); MODULE_SCOPE Tcl_HashTable *Itcl_GetNamespaceCommandTable(Tcl_Namespace *nsPtr); MODULE_SCOPE int Itcl_InitRewriteEnsemble(Tcl_Interp *interp, size_t numRemoved, size_t numInserted, size_t objc, Tcl_Obj *const *objv); MODULE_SCOPE void Itcl_ResetRewriteEnsemble(Tcl_Interp *interp, |
︙ | ︙ |