Changeset 2df510 in git


Ignore:
Timestamp:
Jan 10, 2011, 4:18:21 PM (13 years ago)
Author:
Hans Schoenemann <hannes@…>
Branches:
(u'spielwiese', 'fe61d9c35bf7c61f2b6cbf1b56e25e2f08d536cc')
Children:
9d9078c32f6ce964020184d91f40010fd70721c9
Parents:
c1969fe8f1c027ad2fc7200c4b3bbb5aeab824c7
Message:
preparation for newtype: blacjbox interface changed

git-svn-id: file:///usr/local/Singular/svn/trunk@13788 2c84dea3-7e68-4137-9b89-c4e89433aadc
Location:
Singular
Files:
4 edited

Legend:

Unmodified
Added
Removed
  • Singular/bigintm.cc

    rc1969f r2df510  
    1010// as this is only a demo,
    1111// we do not included compiled code:
    12 #if 1
     12#if 0
    1313char * bigintm_String(blackbox *b, void *d);
    1414void * bigintm_Copy(blackbox*b, void *d);
  • Singular/blackbox.cc

    rc1969f r2df510  
    3434  omFree(s);
    3535}
    36 void *blackbox_default_Init()
     36void *blackbox_default_Init(blackbox *b)
    3737{
    3838  return NULL;
     
    5959}
    6060
    61 int setBlackboxStuff(blackbox *bb, char *n)
     61int setBlackboxStuff(blackbox *bb, const char *n)
    6262{
    6363  blackboxTable[blackboxTableCnt]=bb;
  • Singular/blackbox.h

    rc1969f r2df510  
    2020  void (*blackbox_Print)(blackbox *b,void *d);
    2121  /// construct the default object
    22   void *(*blackbox_Init)();
     22  void *(*blackbox_Init)(blackbox *b);
    2323  /// copy the object: b points to blackbox_struct, d to data
    2424  void *(*blackbox_Copy)(blackbox *b,void *d);
     
    3333  /// interpreter: operations with undefined number of operands
    3434  BOOLEAN (*blackbox_OpM)(int op,leftv l, leftv r);
     35  /// additional type info
     36  void *data;
    3537} ;
    3638
     
    4244int blackboxIsCmd(const char *n, int & tok);
    4345/// define a new type
    44 int setBlackboxStuff(blackbox *bb,char *name);
     46int setBlackboxStuff(blackbox *bb,const char *name);
    4547
    4648/// list all defined type (for debugging)
  • Singular/ipid.cc

    rc1969f r2df510  
    192192             blackbox *bb=getBlackboxStuff(t);
    193193             if (bb!=NULL)
    194                IDSTRING(h)=(char *)bb->blackbox_Init();
     194               IDSTRING(h)=(char *)bb->blackbox_Init(bb);
    195195           }
    196196           else
Note: See TracChangeset for help on using the changeset viewer.