Changeset: 4493e4675cf4 for MonetDB
URL: https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=4493e4675cf4
Modified Files:
        clients/Tests/exports.stable.out
        monetdb5/mal/mal_exception.c
        monetdb5/mal/mal_exception.h
Branch: default
Log Message:

Fix interface.


diffs (50 lines):

diff --git a/clients/Tests/exports.stable.out b/clients/Tests/exports.stable.out
--- a/clients/Tests/exports.stable.out
+++ b/clients/Tests/exports.stable.out
@@ -1301,7 +1301,7 @@ str io_stdin(Client cntxt, MalBlkPtr mb,
 str io_stdout(Client cntxt, MalBlkPtr mb, MalStkPtr stk, InstrPtr pci);
 int isBlocking(InstrPtr p);
 int isDelta(InstrPtr q);
-int isExceptionVariable(str nme);
+bool isExceptionVariable(const char *nme);
 int isFragmentGroup(InstrPtr q);
 int isFragmentGroup2(InstrPtr q);
 int isIdentifier(str s);
diff --git a/monetdb5/mal/mal_exception.c b/monetdb5/mal/mal_exception.c
--- a/monetdb5/mal/mal_exception.c
+++ b/monetdb5/mal/mal_exception.c
@@ -33,14 +33,14 @@ static char *exceptionNames[] = {
 /*EOE*/        NULL
 };
 
-int
-isExceptionVariable(str nme){
-       int i;
-       if( nme)
-               for(i=0; exceptionNames[i]; i++)
-               if( strcmp(exceptionNames[i],nme)==0)
-                       return 1;
-       return 0;
+bool
+isExceptionVariable(const char *nme)
+{
+       if (nme)
+               for (int i = 0; exceptionNames[i]; i++)
+                       if (strcmp(exceptionNames[i], nme) == 0)
+                               return true;
+       return false;
 }
 
 static char *M5OutOfMemory = MAL_MALLOC_FAIL;
diff --git a/monetdb5/mal/mal_exception.h b/monetdb5/mal/mal_exception.h
--- a/monetdb5/mal/mal_exception.h
+++ b/monetdb5/mal/mal_exception.h
@@ -49,7 +49,7 @@ mal_export str createMalException(MalBlk
        _In_z_ _Printf_format_string_ const char *, ...)
        __attribute__((__format__(__printf__, 4, 5)))
        __attribute__((__returns_nonnull__));
-mal_export int isExceptionVariable(str nme);
+mal_export bool isExceptionVariable(const char *nme);
 
 mal_export enum malexception   getExceptionType(const char *);
 mal_export str getExceptionPlace(const char *);
_______________________________________________
checkin-list mailing list
checkin-list@monetdb.org
https://www.monetdb.org/mailman/listinfo/checkin-list

Reply via email to