Skip to content

Commit

Permalink
Merge pull request #577 from ChrisJefferson/changebag-fix
Browse files Browse the repository at this point in the history
fix for a number of issues with missing 'CHANGED_BAG' calls
  • Loading branch information
alex-konovalov committed Feb 7, 2016
2 parents 3a8a77f + 5973aee commit f00140f
Showing 1 changed file with 9 additions and 1 deletion.
10 changes: 9 additions & 1 deletion src/opers.c
Original file line number Diff line number Diff line change
Expand Up @@ -1613,6 +1613,7 @@ Obj CallHandleMethodNotFound( Obj oper,
SET_LEN_PLIST(arglist,nargs);
for (i = 0; i < nargs; i++)
SET_ELM_PLIST( arglist, i+1, args[i]);
CHANGED_BAG(arglist);
AssPRec(r,RNamArguments,arglist);
AssPRec(r,RNamIsVerbose,verbose ? True : False);
AssPRec(r,RNamIsConstructor,constructor ? True : False);
Expand Down Expand Up @@ -5184,6 +5185,7 @@ Obj NewOperationArgs (
Obj nams )
{
Obj func;
Obj namobj;

/* create the function */
func = NewFunctionT( T_FUNCTION, SIZE_FUNC, name, narg, nams,
Expand All @@ -5206,7 +5208,9 @@ Obj NewOperationArgs (
}

/* added the name */
NAME_FUNC(func) = CopyObj( name, 0 );
namobj = CopyObj( name, 0 );
NAME_FUNC(func) = namobj;
CHANGED_BAG(func);

/* and return */
return func;
Expand Down Expand Up @@ -5466,6 +5470,7 @@ Obj FuncNEW_OPERATION_ARGS (
list = NEW_PLIST( T_PLIST, 1 );
SET_LEN_PLIST( list, 1 );
SET_ELM_PLIST( list, 1, args );
CHANGED_BAG( list );
return NewOperationArgs( name, -1, list );
}

Expand Down Expand Up @@ -6349,15 +6354,18 @@ static Int InitLibrary (
C_NEW_STRING_CONST( str, "obj" );
RESET_FILT_LIST( str, FN_IS_MUTABLE );
SET_ELM_PLIST( ArglistObj, 1, str );
CHANGED_BAG( ArglistObj );

ArglistObjVal = NEW_PLIST( T_PLIST+IMMUTABLE, 2 );
SET_LEN_PLIST( ArglistObjVal, 2 );
C_NEW_STRING_CONST( str, "obj" );
RESET_FILT_LIST( str, FN_IS_MUTABLE );
SET_ELM_PLIST( ArglistObjVal, 1, str );
CHANGED_BAG( ArglistObjVal );
C_NEW_STRING_CONST( str, "val" );
RESET_FILT_LIST( str, FN_IS_MUTABLE );
SET_ELM_PLIST( ArglistObjVal, 2, str );
CHANGED_BAG( ArglistObjVal );

HIDDEN_IMPS = NEW_PLIST(T_PLIST, 0);
SET_LEN_PLIST(HIDDEN_IMPS, 0);
Expand Down

0 comments on commit f00140f

Please sign in to comment.