Changeset a83b1f in git for libpolys


Ignore:
Timestamp:
Mar 19, 2022, 4:40:00 PM (2 years ago)
Author:
Hans Schoenemann <hannes@…>
Branches:
(u'spielwiese', 'fe61d9c35bf7c61f2b6cbf1b56e25e2f08d536cc')
Children:
a6029b833a41cc3e5095d46da10d0d366cf45c4f
Parents:
9d46c62371afe083a04695cefe80eff68e050fdb
Message:
provide dummy routines for cfRead,cfSetMap which report error if used
File:
1 edited

Legend:

Unmodified
Added
Removed
  • libpolys/coeffs/numbers.cc

    r9d46c62 ra83b1f  
    327327}
    328328
     329static const char *ndRead(const char * s, number *, const coeffs r)
     330{
     331  Werror("cfRead is undefined for %s",nCoeffString(r));
     332  return s;
     333}
     334static nMapFunc ndSetMap(const coeffs src, const coeffs dst)
     335{
     336  if (src==dst) return ndCopyMap;
     337  Werror("cfSetMap is undefined for %s",nCoeffString(dst));
     338  return NULL;
     339}
    329340
    330341static BOOLEAN ndCoeffIsEqual(const coeffs r, n_coeffType n, void *)
     
    444455#endif
    445456
     457    // report error, if not redefined
     458    n->cfRead=ndRead;
     459    n->cfSetMap=ndSetMap;
     460
    446461#ifdef LDEBUG
    447462    n->cfDBTest=ndDBTest;
     
    506521
    507522
    508     if(n->cfRead==NULL) PrintS("cfRead missing\n");
    509523    if(n->cfGreater==NULL) PrintS("cfGreater missing\n");
    510524    if(n->cfEqual==NULL) PrintS("cfEqual missing\n");
     
    513527    if(n->cfIsMOne==NULL) PrintS("cfIsMOne missing\n");
    514528    if(n->cfGreaterZero==NULL) PrintS("cfGreaterZero missing\n");
    515     if(n->cfSetMap==NULL) PrintS("cfSetMap missing\n");
     529    /* error reporter:
     530    if(n->cfRead==ndRead) PrintS("cfRead missing\n");
     531    if(n->cfSetMap==ndSetMap) PrintS("cfSetMap missing\n");
     532    */
    516533
    517534    assume(n->type==t);
Note: See TracChangeset for help on using the changeset viewer.