Changeset 33337c in git
- Timestamp:
- Aug 1, 2012, 10:55:45 PM (12 years ago)
- Branches:
- (u'spielwiese', 'fe61d9c35bf7c61f2b6cbf1b56e25e2f08d536cc')
- Children:
- 90707fe7a3c0c2873e22571154750fc1c113345a
- Parents:
- 0a64d508717f0b937487db90cbd170908343cb3b
- git-author:
- Alexander Dreyer <alexander.dreyer@itwm.fraunhofer.de>2012-08-01 22:55:45+02:00
- git-committer:
- Alexander Dreyer <alexander.dreyer@itwm.fraunhofer.de>2012-08-01 22:57:39+02:00
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
Singular/pyobject.cc
r0a64d50 r33337c 20 20 21 21 #include <kernel/febase.h> 22 // #include <kernel/longrat.h>23 22 24 23 #include "subexpr.h" … … 129 128 return *this; 130 129 131 Werror("unary op %d not implemented for pyobject", op);130 Werror("unary operation '%s` not implemented for 'pyobject`", iiTwoOps(op)); 132 131 return self(); 133 132 } … … 149 148 case '.': case COLONCOLON: case ATTRIB_CMD: return attr(arg); 150 149 } 151 Werror("binary op %d not implemented for pyobject!", op);150 Werror("binary operation '%d` not implemented for 'pyobject`", iiTwoOps(op)); 152 151 153 152 return self(); … … 162 161 } 163 162 164 Werror("ternary op %d not implemented for pyobject!", op);163 Werror("ternary operation %s not implemented for 'pyobject`", iiTwoOps(op)); 165 164 return self(); 166 165 } … … 335 334 case STRING_CMD: return PythonCastStatic<const char*>(value); 336 335 case LIST_CMD: return PythonCastStatic<lists>(value); 337 // case UNKNOWN: return PythonCastStatic<const char*>((void*)value->Name()); 338 } 339 340 Werror("type # %d incompatible with pyobject", typeId); 336 } 337 338 if (typeId > MAX_TOK) // custom types 339 { 340 blackbox *bbx = getBlackboxStuff(typeId); 341 sleftv tmp; 342 if (! bbx->blackbox_Op1(PythonInterpreter::id(), &tmp, value) ) 343 return PythonCastStatic<>(&tmp); 344 } 345 else 346 Werror("type '%s` incompatible with 'pyobject`", iiTwoOps(typeId)); 347 341 348 return PythonObject(); 342 349 } … … 496 503 long value = PyInt_AsLong(PythonCastStatic<>(head)); 497 504 if( (value == -1) && PyErr_Occurred() ) { 498 Werror(" pyobjectcannot be converted to integer");505 Werror("'pyobject` cannot be converted to integer"); 499 506 PyErr_Clear(); 500 507 return TRUE; … … 513 520 514 521 } 522 515 523 return PythonCastStatic<>(head)(op).assign_to(res); 516 524 }
Note: See TracChangeset
for help on using the changeset viewer.