Skip to content

Commit

Permalink
Using blackbox-functionality to check whther type was already loaded
Browse files Browse the repository at this point in the history
  • Loading branch information
alexanderdreyer committed Dec 11, 2012
1 parent e87d402 commit bd8204a
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions Singular/countedref.cc
Original file line number Diff line number Diff line change
Expand Up @@ -695,6 +695,10 @@ BOOLEAN countedref_deserialize(blackbox **b, void **d, si_link f)

void countedref_reference_load()
{
int tok;
if (blackboxIsCmd("reference", tok) == ROOT_DECL)
return;

blackbox *bbx = (blackbox*)omAlloc0(sizeof(blackbox));
bbx->blackbox_CheckAssign = countedref_CheckAssign;
bbx->blackbox_destroy = countedref_destroy;
Expand All @@ -715,6 +719,10 @@ void countedref_reference_load()

void countedref_shared_load()
{
int tok;
if (blackboxIsCmd("shared", tok) == ROOT_DECL)
return;

blackbox *bbxshared = (blackbox*)omAlloc0(sizeof(blackbox));
bbxshared->blackbox_String = countedref_String;
bbxshared->blackbox_Print = countedref_Print;
Expand Down

0 comments on commit bd8204a

Please sign in to comment.