Changeset af42ca in git for Singular/extra.cc


Ignore:
Timestamp:
Jan 29, 2003, 5:13:12 PM (21 years ago)
Author:
Hans Schönemann <hannes@…>
Branches:
(u'spielwiese', '6e5adcba05493683b94648c659a729c189812c77')
Children:
cc86cd3b37e46f65f8f2f4c0bea2f9c0a3438043
Parents:
18e9f2f7714c20737d239d02c81a2a64fcc2e65b
Message:
*hannes: ref count etc.


git-svn-id: file:///usr/local/Singular/svn/trunk@6442 2c84dea3-7e68-4137-9b89-c4e89433aadc
File:
1 edited

Legend:

Unmodified
Added
Removed
  • Singular/extra.cc

    r18e9f2f raf42ca  
    22*  Computer Algebra System SINGULAR      *
    33*****************************************/
    4 /* $Id: extra.cc,v 1.192 2003-01-29 16:04:18 levandov Exp $ */
     4/* $Id: extra.cc,v 1.193 2003-01-29 16:13:10 Singular Exp $ */
    55/*
    66* ABSTRACT: general interface to internals of Singular ("system" command)
     
    14001400      {
    14011401        currRing->nc=(nc_struct *)omAlloc0(sizeof(nc_struct));
     1402        currRing->nc->ref=1;
    14021403      }
    14031404      else
    14041405      {
    14051406        WarnS("redefining algebra structure");
    1406         /* kill the previous nc data */
     1407        if (currRing->nc->ref>1) // in use by somebody else
     1408          currRing->nc->ref--;
     1409        else
     1410          ncKill(currRing); /* kill the previous nc data */
     1411        currRing->nc=(nc_struct *)omAlloc0(sizeof(nc_struct));
     1412        currRing->nc->ref=1;
    14071413      }
    14081414      currRing->nc->type=nc_general;
Note: See TracChangeset for help on using the changeset viewer.