Skip to content
Browse files

Small changes to keep older compilers happy

e.g. gcc 2.95

Signed-off-by: Steve Bennett <steveb@workware.net.au>
  • Loading branch information...
1 parent 5a60b3e commit ec88bf12f4f525f1859a9d5fdbb5d38f193c744e @msteveb committed Jul 22, 2011
Showing with 7 additions and 1 deletion.
  1. +2 −1 jim.c
  2. +2 −0 make-bootstrap-jim
  3. +3 −0 make-load-static-exts.tcl
View
3 jim.c
@@ -10282,11 +10282,12 @@ static int JimCallProcedure(Jim_Interp *interp, Jim_Cmd *cmd, const char *filena
Jim_Obj *nameObjPtr = cmd->u.proc.arglist[d].nameObjPtr;
if (d == cmd->u.proc.argsPos) {
/* assign $args */
+ Jim_Obj *listObjPtr;
int argsLen = 0;
if (cmd->u.proc.reqArity + cmd->u.proc.optArity < argc - 1) {
argsLen = argc - 1 - (cmd->u.proc.reqArity + cmd->u.proc.optArity);
}
- Jim_Obj *listObjPtr = Jim_NewListObj(interp, &argv[i], argsLen);
+ listObjPtr = Jim_NewListObj(interp, &argv[i], argsLen);
/* It is possible to rename args. */
if (cmd->u.proc.arglist[d].defaultObjPtr) {
View
2 make-bootstrap-jim
@@ -33,6 +33,8 @@ EOF
echo "{"
for ext in $*; do
echo "extern int Jim_${ext}Init(Jim_Interp *);"
+ done
+ for ext in $*; do
echo "Jim_${ext}Init(interp);"
done
echo "return JIM_OK;"
View
3 make-load-static-exts.tcl
@@ -37,6 +37,9 @@ puts \{
foreach e $exts {
set ext [lindex $e 1]
puts "\textern int Jim_${ext}Init(Jim_Interp *);"
+}
+foreach e $exts {
+ set ext [lindex $e 1]
puts "\tJim_${ext}Init(interp);"
}

0 comments on commit ec88bf1

Please sign in to comment.
Something went wrong with that request. Please try again.