changeset 604:90dfdac91b9b

- cleanups, made some arrays local to TUs, etc.
author Tassilo Philipp
date Wed, 21 Sep 2022 14:36:44 +0200
parents c1208587091c
children 0f40e13a2f0a
files test/suite/case.c test/suite2/case.cc test/suite2_x86win32fast/case.cc test/suite2_x86win32std/case.cc test/suite3/case.cc test/suite_floats/case.cc test/suite_x86win32fast/case.cc test/suite_x86win32std/case.cc
diffstat 8 files changed, 45 insertions(+), 44 deletions(-) [+]
line wrap: on
line diff
--- a/test/suite/case.c	Wed Sep 21 13:26:31 2022 +0200
+++ b/test/suite/case.c	Wed Sep 21 14:36:44 2022 +0200
@@ -29,7 +29,7 @@
 #include "config.h"
 #include "../../dyncall/dyncall_value.h"
 
-DCValue mValue[NARGS];
+static DCValue mValue[NARGS];
 
 void clearValues() { int i; for(i=0; i<NARGS; ++i) mValue[i].L = 0xCAFEBABEDEADC0DEULL; }
 
@@ -88,10 +88,11 @@
 #define VF10(id,A1,A2,A3,A4,A5,A6,A7,A8,A9,A10,S) (void(*)())(S),
 
 typedef void (*fp)();
-fp gFuncTable[] = {
+static fp gFuncTable[] = {
 #include "case.h"
 };
 
 DCpointer getFunc(int x) {
   return (DCpointer)gFuncTable[x];
 }
+
--- a/test/suite2/case.cc	Wed Sep 21 13:26:31 2022 +0200
+++ b/test/suite2/case.cc	Wed Sep 21 14:36:44 2022 +0200
@@ -30,7 +30,7 @@
 #include "../../dyncall/dyncall_value.h"
 #include "funcinfo.h"
 
-DCValue mValue[MAXARGS];
+static DCValue mValue[MAXARGS];
 
 void clearValues() { for(int i = 0;i<MAXARGS;++i) mValue[i].L = 0xCAFEBABEDEADC0DEULL; }
 
--- a/test/suite2_x86win32fast/case.cc	Wed Sep 21 13:26:31 2022 +0200
+++ b/test/suite2_x86win32fast/case.cc	Wed Sep 21 14:36:44 2022 +0200
@@ -36,19 +36,19 @@
 #define API __fastcall
 #endif
 
-DCValue mValue[MAXARGS];
+static DCValue mValue[MAXARGS];
 
 void clearValues() { for(int i = 0;i<MAXARGS;++i) mValue[i].L = 0xCAFEBABEDEADC0DEULL; }
 
 template<typename T> void g(T value, int pos);
 
-template<> void g(DCchar value, int pos) { mValue[pos].c = value; }
-template<> void g(DCshort value, int pos) { mValue[pos].s = value; }
-template<> void g(DCint value, int pos) { mValue[pos].i = value; }
-template<> void g(DCpointer value, int pos) { mValue[pos].p = value; }
+template<> void g(DCchar     value, int pos) { mValue[pos].c = value; }
+template<> void g(DCshort    value, int pos) { mValue[pos].s = value; }
+template<> void g(DCint      value, int pos) { mValue[pos].i = value; }
+template<> void g(DCpointer  value, int pos) { mValue[pos].p = value; }
 template<> void g(DClonglong value, int pos) { mValue[pos].l = value; }
-template<> void g(DCfloat value, int pos) { mValue[pos].f = value; }
-template<> void g(DCdouble value, int pos) { mValue[pos].d = value; }
+template<> void g(DCfloat    value, int pos) { mValue[pos].f = value; }
+template<> void g(DCdouble   value, int pos) { mValue[pos].d = value; }
 
 DCValue* getArg(int pos) { return &mValue[pos]; }
 
@@ -133,5 +133,3 @@
 
 };
 
-
-
--- a/test/suite2_x86win32std/case.cc	Wed Sep 21 13:26:31 2022 +0200
+++ b/test/suite2_x86win32std/case.cc	Wed Sep 21 14:36:44 2022 +0200
@@ -36,20 +36,20 @@
 #define API __stdcall
 #endif
 
-DCValue mValue[MAXARGS];
+static DCValue mValue[MAXARGS];
 
 void clearValues() { for(int i = 0;i<MAXARGS;++i) mValue[i].L = 0xCAFEBABEDEADC0DEULL; }
 
 template<typename T> void g(T value, int pos);
 
-template<> void g(DCchar value, int pos) { mValue[pos].c = value; }
-template<> void g(DCshort value, int pos) { mValue[pos].s = value; }
-template<> void g(DCint value, int pos) { mValue[pos].i = value; }
-template<> void g(DCpointer value, int pos) { mValue[pos].p = value; }
-template<> void g(DClong value, int pos) { mValue[pos].l = value; }
-template<> void g(DClonglong value, int pos) { mValue[pos].L = value; }
-template<> void g(DCfloat value, int pos) { mValue[pos].f = value; }
-template<> void g(DCdouble value, int pos) { mValue[pos].d = value; }
+template<> void g(DCchar     value, int pos) { mValue[pos].c = value ; }
+template<> void g(DCshort    value, int pos) { mValue[pos].s = value ; }
+template<> void g(DCint      value, int pos) { mValue[pos].i = value ; }
+template<> void g(DCpointer  value, int pos) { mValue[pos].p = value ; }
+template<> void g(DClong     value, int pos) { mValue[pos].l = value ; }
+template<> void g(DClonglong value, int pos) { mValue[pos].L = value ; }
+template<> void g(DCfloat    value, int pos) { mValue[pos].f = value ; }
+template<> void g(DCdouble   value, int pos) { mValue[pos].d = value ; }
 
 DCValue* getArg(int pos) { return &mValue[pos]; }
 
@@ -134,5 +134,3 @@
 
 };
 
-
-
--- a/test/suite3/case.cc	Wed Sep 21 13:26:31 2022 +0200
+++ b/test/suite3/case.cc	Wed Sep 21 14:36:44 2022 +0200
@@ -29,7 +29,7 @@
 #include "config.h"
 #include "../../dyncall/dyncall_value.h"
 
-DCValue mValue[NARGS];
+static DCValue mValue[NARGS];
 
 void clearValues() { for(int i = 0;i<NARGS;++i) mValue[i].L = 0xCAFEBABEDEADC0DEULL; }
 
@@ -88,10 +88,11 @@
 #define VF10(id,A1,A2,A3,A4,A5,A6,A7,A8,A9,A10,S) reinterpret_cast<void(*)()>(S),
 
 typedef void (*fp)();
-fp gFuncTable[] = {
+static fp gFuncTable[] = {
 #include "case.h"
 };
 
 DCpointer getFunc(int x) {
   return (DCpointer) gFuncTable[x];
 }
+
--- a/test/suite_floats/case.cc	Wed Sep 21 13:26:31 2022 +0200
+++ b/test/suite_floats/case.cc	Wed Sep 21 14:36:44 2022 +0200
@@ -29,7 +29,7 @@
 #include "config.h"
 #include "../../dyncall/dyncall_value.h"
 
-DCValue mValue[NARGS];
+static DCValue mValue[NARGS];
 
 void clearValues() { for(int i = 0;i<NARGS;++i) mValue[i].L = 0xCAFEBABEDEADC0DEULL; }
 
@@ -91,10 +91,11 @@
 #define VF10(id,A1,A2,A3,A4,A5,A6,A7,A8,A9,A10,S) reinterpret_cast<void(*)()>(S),
 
 typedef void (*fp)();
-fp gFuncTable[] = {
+static fp gFuncTable[] = {
 #include "case.h"
 };
 
 DCpointer getFunc(int x) {
   return (DCpointer) gFuncTable[x];
 }
+
--- a/test/suite_x86win32fast/case.cc	Wed Sep 21 13:26:31 2022 +0200
+++ b/test/suite_x86win32fast/case.cc	Wed Sep 21 14:36:44 2022 +0200
@@ -29,20 +29,20 @@
 #include "config.h"
 #include "../../dyncall/dyncall_value.h"
 
-DCValue mValue[NARGS];
+static DCValue mValue[NARGS];
 
 void clearValues() { for(int i = 0;i<NARGS;++i) mValue[i].L = 0xCAFEBABEDEADC0DEULL; }
 
 template<typename T> void g(T value, int pos);
 
-template<> void g(DCchar value, int pos) { mValue[pos].c = value; }
-template<> void g(DCshort value, int pos) { mValue[pos].s = value; }
-template<> void g(DCint value, int pos) { mValue[pos].i = value; }
-template<> void g(DClong value, int pos) { mValue[pos].l = value; }
+template<> void g(DCchar     value, int pos) { mValue[pos].c = value; }
+template<> void g(DCshort    value, int pos) { mValue[pos].s = value; }
+template<> void g(DCint      value, int pos) { mValue[pos].i = value; }
+template<> void g(DClong     value, int pos) { mValue[pos].l = value; }
 template<> void g(DClonglong value, int pos) { mValue[pos].L = value; }
-template<> void g(DCfloat value, int pos) { mValue[pos].f = value; }
-template<> void g(DCdouble value, int pos) { mValue[pos].d = value; }
-template<> void g(DCpointer value, int pos) { mValue[pos].p = value; }
+template<> void g(DCfloat    value, int pos) { mValue[pos].f = value; }
+template<> void g(DCdouble   value, int pos) { mValue[pos].d = value; }
+template<> void g(DCpointer  value, int pos) { mValue[pos].p = value; }
 
 DCValue* getArg(int pos) { return &mValue[pos]; }
 
@@ -98,10 +98,11 @@
 #define VF10(id,A1,A2,A3,A4,A5,A6,A7,A8,A9,A10,S) reinterpret_cast<void(*)()>(S),
 
 typedef void (*fp)();
-fp gFuncTable[] = {
+static fp gFuncTable[] = {
 #include "case.h"
 };
 
 DCpointer getFunc(int x) {
   return (DCpointer) gFuncTable[x];
 }
+
--- a/test/suite_x86win32std/case.cc	Wed Sep 21 13:26:31 2022 +0200
+++ b/test/suite_x86win32std/case.cc	Wed Sep 21 14:36:44 2022 +0200
@@ -29,19 +29,19 @@
 #include "config.h"
 #include "../../dyncall/dyncall_value.h"
 
-DCValue mValue[NARGS];
+static DCValue mValue[NARGS];
 
 void clearValues() { for(int i = 0;i<NARGS;++i) mValue[i].L = 0xCAFEBABEDEADC0DEULL; }
 
 template<typename T> void g(T value, int pos);
 
-template<> void g(DCchar value, int pos) { mValue[pos].c = value; }
-template<> void g(DCshort value, int pos) { mValue[pos].s = value; }
-template<> void g(DCint value, int pos) { mValue[pos].i = value; }
+template<> void g(DCchar     value, int pos) { mValue[pos].c = value; }
+template<> void g(DCshort    value, int pos) { mValue[pos].s = value; }
+template<> void g(DCint      value, int pos) { mValue[pos].i = value; }
 template<> void g(DClonglong value, int pos) { mValue[pos].L = value; }
-template<> void g(DCfloat value, int pos) { mValue[pos].f = value; }
-template<> void g(DCdouble value, int pos) { mValue[pos].d = value; }
-template<> void g(DCpointer value, int pos) { mValue[pos].p = value; }
+template<> void g(DCfloat    value, int pos) { mValue[pos].f = value; }
+template<> void g(DCdouble   value, int pos) { mValue[pos].d = value; }
+template<> void g(DCpointer  value, int pos) { mValue[pos].p = value; }
 
 DCValue* getArg(int pos) { return &mValue[pos]; }
 
@@ -97,10 +97,11 @@
 #define VF10(id,A1,A2,A3,A4,A5,A6,A7,A8,A9,A10,S) reinterpret_cast<void(*)()>(S),
 
 typedef void (*fp)();
-fp gFuncTable[] = {
+static fp gFuncTable[] = {
 #include "case.h"
 };
 
 DCpointer getFunc(int x) {
   return (DCpointer) gFuncTable[x];
 }
+