- Timestamp:
- Mar 28, 2011, 3:21:43 PM (16 years ago)
- Branches:
- 1941-docker-image-to-test, devel, master
- Children:
- dd6e916
- Parents:
- 7b25567
- Location:
- toltcl/generic
- Files:
-
- 3 edited
-
tolaccess.cpp (modified) (1 diff)
-
toltcl.c (modified) (1 diff)
-
toltclInt.h (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
toltcl/generic/tolaccess.cpp
r7b25567 rfe54d8d 2437 2437 } 2438 2438 BText addr = syn->GetAddressFromObject( ); 2439 Tcl_AppendStringsToObj( obj_result, addr.Buffer( ), NULL ); 2439 Tcl_SetStringObj( obj_result, addr.Buffer( ), -1 ); 2440 return TCL_OK; 2441 } 2442 2443 /* 2444 * Fill in obj_result the specific type for an Anything object, could 2445 * be: Struct, Class or Anything. 2446 */ 2447 int Tol_GetAnythingType( Tcl_Interp * interp, 2448 Tcl_Obj * obj_ref, 2449 Tcl_Obj * obj_result) 2450 { 2451 const BSyntaxObject *syn ; 2452 2453 #ifndef _NDEBUG 2454 //#define _PRINT_ANYTHING_OBJREF_ 2455 #endif 2456 2457 #ifdef _PRINT_ANYTHING_OBJREF_ 2458 printf( "obj_ref = %s\n", Tcl_GetString( obj_ref ) ); 2459 #endif 2460 2461 if ( !( syn = Tol_ResolveObject( interp, obj_ref, obj_result ) ) ) { 2462 return TCL_ERROR; 2463 } 2464 2465 if ( syn->Mode() == BCLASSMODE ) { 2466 Tcl_SetStringObj( obj_result, "Class", -1 ); 2467 } else if ( syn->Mode() == BSTRUCTMODE ) { 2468 Tcl_SetStringObj( obj_result, "Struct", -1 ); 2469 } else { 2470 Tcl_SetStringObj( obj_result, "Anything", -1 ); 2471 } 2440 2472 return TCL_OK; 2441 2473 } -
toltcl/generic/toltcl.c
r7b25567 rfe54d8d 964 964 objv[2], obj_result ); 965 965 } 966 } else if (!strncasecmp("anything", arg, length)) { 967 if (objc != 3) { 968 Tcl_AppendStringsToObj(obj_result, 969 "wrong # args: should be '", 970 Tcl_GetString(objv[0]), 971 " anything {grammar|container objname ?indexes?}'", 972 NULL); 973 tcl_result = TCL_ERROR; 974 } else { 975 tcl_result = Tol_GetAnythingType( interp, 976 objv[2], obj_result ); 977 } 966 978 } else if (!strncasecmp("included", arg, length)) { 967 979 if (objc == 2) -
toltcl/generic/toltclInt.h
r7b25567 rfe54d8d 124 124 Tcl_Obj * obj_ref, 125 125 Tcl_Obj * obj_result)); 126 /* 127 * Fill in obj_result the specific type for an Anything object, could 128 * be: Struct, Class or Anything. 129 */ 130 extern int Tol_GetAnythingType _ANSI_ARGS_( (Tcl_Interp * interp, 131 Tcl_Obj * obj_ref, 132 Tcl_Obj * obj_result)); 133 126 134 /*! Return the path of a set if it is a file, trigger an error in other case 127 135 */
Note: See TracChangeset
for help on using the changeset viewer.
