Changeset: 4de345c75d78 for MonetDB
URL: https://dev.monetdb.org/hg/MonetDB/rev/4de345c75d78
Modified Files:
clients/Tests/exports.stable.out
monetdb5/mal/mal_instruction.c
monetdb5/mal/mal_instruction.h
Branch: no_type_bat
Log Message:
Don't pretend an argument is const if it isn't.
diffs (49 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
@@ -1005,7 +1005,7 @@ int getStrConstant(MalBlkPtr mb, str val
const char *getTraceRef;
str getTypeIdentifier(malType tpe);
str getTypeName(malType tpe);
-char *getVarNameIntoBuffer(MalBlkPtr mb, int idx, const char *buf);
+char *getVarNameIntoBuffer(MalBlkPtr mb, int idx, char *buf);
const char *getVariableRef;
Module globalModule(const char *nme);
const char *grantRef;
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
@@ -600,17 +600,17 @@ setVariableType(MalBlkPtr mb, const int
}
char *
-getVarNameIntoBuffer(MalBlkPtr mb, int idx, const char *buf)
+getVarNameIntoBuffer(MalBlkPtr mb, int idx, char *buf)
{
char *s = mb->var[idx].name;
if (getVarKind(mb, idx) == 0)
setVarKind(mb, idx, REFMARKER);
if (s == NULL) {
- (void) snprintf((char*)buf, IDLENGTH, "%c_%d", getVarKind(mb,
idx), idx);
+ (void) snprintf(buf, IDLENGTH, "%c_%d", getVarKind(mb, idx),
idx);
} else {
- (void) snprintf((char*)buf, IDLENGTH, "%s", s);
+ (void) snprintf(buf, IDLENGTH, "%s", s);
}
- return (char*)buf;
+ return buf;
}
int
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
@@ -69,7 +69,7 @@ setFunctionId(InstrPtr p, const char *s)
#define getVar(M,I) (&(M)->var[I])
#define getVarType(M,I) ((M)->var[I].type)
-mal_export char *getVarNameIntoBuffer(MalBlkPtr mb, int idx, const char *buf);
+mal_export char *getVarNameIntoBuffer(MalBlkPtr mb, int idx, char *buf);
#define getVarKind(M,I) ((M)->var[I].kind)
#define getVarGDKType(M,I) getGDKType((M)->var[I].type)
_______________________________________________
checkin-list mailing list -- [email protected]
To unsubscribe send an email to [email protected]