Changeset ed47aab in git
- Timestamp:
- Aug 1, 2012, 11:02:34 PM (12 years ago)
- Branches:
- (u'spielwiese', '4a9821a93ffdc22a6696668bd4f6b8c9de3e6c5f')
- Children:
- eff32475b39858b9ea00d1f210285e77a6d485d1
- Parents:
- 3d69257fe19a1e388e6e33fc7381ea50cf3041cb
- Location:
- Singular
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
Singular/newstruct.cc
r3d69257 red47aab 158 158 l->rtyp=r->Typ(); 159 159 } 160 } 161 else // unrelated types - look for custom conversion 162 { 163 sleftv tmp; 164 BOOLEAN newstruct_Op1(int, leftv, leftv); // forward declaration 165 if (! newstruct_Op1(l->Typ(), &tmp, r)) return newstruct_Assign(l, &tmp); 160 166 } 161 167 } … … 607 613 return NULL; 608 614 } 609 newstruct_desc newstructFromString(const char *s) 615 616 newstruct_desc newstructDesc() 610 617 { 611 618 newstruct_desc res=(newstruct_desc)omAlloc0(sizeof(*res)); 612 619 res->size=0; 613 614 return scanNewstructFromString(s,res); 615 } 620 return res; 621 } 622 623 newstruct_desc newstructFromString(const char *s) 624 { 625 return scanNewstructFromString(s, newstructDesc()); 626 } 627 616 628 newstruct_desc newstructChildFromString(const char *parent, const char *s) 617 629 { -
Singular/newstruct.h
r3d69257 red47aab 5 5 6 6 void newstruct_setup(const char * name, newstruct_desc d); 7 newstruct_desc newstructDesc(); 7 8 newstruct_desc newstructFromString(const char *s); 8 9 newstruct_desc newstructChildFromString(const char *p, const char *s); 9 10 BOOLEAN newstruct_set_proc(const char *name,const char *func,int args, procinfov p); 10 11 void newstructShow(newstruct_desc d); 11 12 12 #endif -
Singular/pyobject.cc
r3d69257 red47aab 521 521 } 522 522 523 if (op > MAX_TOK) // custom types 524 { 525 BOOLEAN newstruct_Op1(int, leftv, leftv); 526 if (! newstruct_Op1(op, res, head) ) return FALSE; 527 } 528 523 529 return PythonCastStatic<>(head)(op).assign_to(res); 524 530 } … … 646 652 b->blackbox_Op3 = pyobject_Op3; 647 653 b->blackbox_OpM = pyobject_OpM; 654 b->data = newstructDesc(); 648 655 649 656 PythonInterpreter::init(setBlackboxStuff(b,"pyobject"));
Note: See TracChangeset
for help on using the changeset viewer.