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

fixed compilation by using correct type: strlen() returns size_t, not int

Side note: why do we require that function newVariable() is called
with a string and its length (implicitly requiring that the correct
length is provided?), while the string length could easily be determined
inside the function ???


diffs (36 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
@@ -2325,7 +2325,7 @@ InstrPtr newStmt(MalBlkPtr mb, const cha
 Symbol newSymbol(str nme, int kind);
 int newTmpVariable(MalBlkPtr mb, malType type);
 int newTypeVariable(MalBlkPtr mb, malType type);
-int newVariable(MalBlkPtr mb, str name, int len, malType type);
+int newVariable(MalBlkPtr mb, str name, size_t len, malType type);
 str nextRef;
 str notRef;
 str not_ilikeRef;
diff --git a/monetdb5/mal/mal_instruction.c b/monetdb5/mal/mal_instruction.c
--- a/monetdb5/mal/mal_instruction.c
+++ b/monetdb5/mal/mal_instruction.c
@@ -751,7 +751,7 @@ makeVarSpace(MalBlkPtr mb)
 
 /* create and initialize a variable record*/
 int
-newVariable(MalBlkPtr mb, str name, int len, malType type)
+newVariable(MalBlkPtr mb, str name, size_t len, malType type)
 {
        int n;
 
diff --git a/monetdb5/mal/mal_instruction.h b/monetdb5/mal/mal_instruction.h
--- a/monetdb5/mal/mal_instruction.h
+++ b/monetdb5/mal/mal_instruction.h
@@ -145,7 +145,7 @@ mal_export int findVariableLength(MalBlk
 mal_export malType getType(MalBlkPtr mb, str nme);
 mal_export str getArgDefault(MalBlkPtr mb, InstrPtr p, int idx);
 mal_export void setVarName(MalBlkPtr mb, int i, str nme);
-mal_export int newVariable(MalBlkPtr mb, str name, int len, malType type);
+mal_export int newVariable(MalBlkPtr mb, str name, size_t len, malType type);
 mal_export int cloneVariable(MalBlkPtr dst, MalBlkPtr src, int varid);
 mal_export void renameVariable(MalBlkPtr mb, int i, str pattern, int newid);
 mal_export int copyVariable(MalBlkPtr dst, VarPtr v);
_______________________________________________
checkin-list mailing list
checkin-list@monetdb.org
https://www.monetdb.org/mailman/listinfo/checkin-list

Reply via email to