Changeset ef21614 in tol
- Timestamp:
- Mar 3, 2012, 11:12:15 AM (15 years ago)
- Branches:
- 1941-docker-image-to-test, devel, master
- Children:
- c300cb7
- Parents:
- 53ea6a0
- File:
-
- 1 edited
-
tol/btol/real_type/datgrav.cpp (modified) (3 diffs)
Legend:
- Unmodified
- Added
- Removed
-
tol/btol/real_type/datgrav.cpp
r53ea6a0 ref21614 767 767 768 768 769 static c har* structFinder_ = "Struct";770 static c har* classFinder_ = "Class";769 static const char* structFinder_ = "Struct"; 770 static const char* classFinder_ = "Class"; 771 771 static BSyntaxObject* structGra_ = (BSyntaxObject*)structFinder_; 772 772 static BSyntaxObject* classGra_ = (BSyntaxObject*)classFinder_; … … 2064 2064 2065 2065 2066 2066 static BUserFunction *tclTextMatch = NULL; 2067 2067 //-------------------------------------------------------------------- 2068 2068 DeclareContensClass(BDat, BDatTemporary, BDatMatchText); … … 2113 2113 if(TolTclIsEnabled()) 2114 2114 { 2115 BText expr = BText("TextMatch_Tcl(\"")+string+"\",\""+pattern+"\","+mode+")"; 2116 BSyntaxObject* uMatch = GraReal()->EvaluateExpr(expr); 2117 if(uMatch) 2118 { 2119 contens_ = Real(uMatch)!=0; 2120 DESTROY(uMatch); 2121 } 2122 } 2123 else 2124 { 2125 Warning("Using internal version of TextMatch could cause invalid results. " 2126 "Please use a TCL version of TOL like tolsh or tolbase."); 2127 contens_ = (BReal)(string.Match(pattern, mode)); 2128 } 2115 if ( tclTextMatch || ( tclTextMatch = (BUserFunction*)GraReal()->FindOperator( "TextMatch_Tcl" ) ) ) { 2116 BList *args = Cons( Arg(1), NCons( Arg(2) ) ); 2117 2118 if ( Arg(3) ) { 2119 LstAppend( args, Arg(3) ); 2120 } else { 2121 BUserDat *uMode = BContensDat::New( "", BDat(mode), "" ); 2122 uMode->PutName( "case" ); 2123 LstAppend( args, uMode ); 2124 } 2125 BSyntaxObject *evalResult = tclTextMatch->Evaluator( args ); 2126 if ( evalResult ) { 2127 contens_ = Dat( evalResult ); 2128 } 2129 // DUDA: debo destruir args? 2130 DESTROY( evalResult ); 2131 return; 2132 } 2133 } 2134 Warning("Using internal version of TextMatch could cause invalid results. " 2135 "Please use a TCL version of TOL like tolsh or tolbase."); 2136 contens_ = (BReal)(string.Match(pattern, mode)); 2129 2137 } 2130 2138
Note: See TracChangeset
for help on using the changeset viewer.
