Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
Make glpSetAutoCheckErrors() return the current setting
And take no arguments to just return the current flag value.
  • Loading branch information
devel-chm committed Apr 8, 2017
1 parent c579dcf commit 5221ed1
Showing 1 changed file with 12 additions and 6 deletions.
18 changes: 12 additions & 6 deletions Modern.xs
Expand Up @@ -104,13 +104,19 @@ CODE:
OUTPUT:
RETVAL

void
glpSetAutoCheckErrors(state)
int state;
int
glpSetAutoCheckErrors(...)
CODE:
if( state != 0 && state != 1 )
croak( "Usage: glpSetAutoCheckErrors(1|0)\n" );
_auto_check_errors = state;
int state;
if (items == 1) {
state = (int)SvIV(ST(0));
if (state != 0 && state != 1 )
croak( "Usage: glpSetAutoCheckErrors(1|0)\n" );
_auto_check_errors = state;
}
RETVAL = _auto_check_errors;
OUTPUT:
RETVAL

void
glpCheckErrors()
Expand Down

0 comments on commit 5221ed1

Please sign in to comment.