aboutsummaryrefslogtreecommitdiffstats
path: root/code/qcommon
diff options
context:
space:
mode:
authorludwig <ludwig@edf5b092-35ff-0310-97b2-ce42778d08ea>2005-09-26 22:23:46 +0000
committerludwig <ludwig@edf5b092-35ff-0310-97b2-ce42778d08ea>2005-09-26 22:23:46 +0000
commit8a55a111ece2b7aa6652d3eb3c4de8743a02bf92 (patch)
treed1c57be3a2fb84db50e4fb5dfd0b787648c1b8fc /code/qcommon
parenta0f1b32027b3864664614088f1f1e08ca756a1ae (diff)
downloadioquake3-aero-8a55a111ece2b7aa6652d3eb3c4de8743a02bf92.tar.gz
ioquake3-aero-8a55a111ece2b7aa6652d3eb3c4de8743a02bf92.zip
revert int->long change as it breaks on 64bit. Actually only
VM_CallInterpreted hurts as VM_CallCompiled is only used on 32bit. Use same arg types for consistency nevertheless. git-svn-id: svn://svn.icculus.org/quake3/trunk@118 edf5b092-35ff-0310-97b2-ce42778d08ea
Diffstat (limited to 'code/qcommon')
-rw-r--r--code/qcommon/vm.c7
-rw-r--r--code/qcommon/vm_interpreted.c2
-rw-r--r--code/qcommon/vm_local.h4
-rw-r--r--code/qcommon/vm_none.c2
-rw-r--r--code/qcommon/vm_ppc.c2
-rw-r--r--code/qcommon/vm_x86.c2
6 files changed, 10 insertions, 9 deletions
diff --git a/code/qcommon/vm.c b/code/qcommon/vm.c
index 2193e03..d5bb3aa 100644
--- a/code/qcommon/vm.c
+++ b/code/qcommon/vm.c
@@ -718,11 +718,12 @@ long QDECL VM_Call( vm_t *vm, long callnum, ... ) {
args[12], args[13], args[14], args[15]);
#if defined(HAVE_VM_COMPILED)
} else if ( vm->compiled ) {
- r = VM_CallCompiled( vm, &callnum );
+ // only used on 32bit machines so this cast is fine
+ r = VM_CallCompiled( vm, (int*)&callnum );
#endif
} else {
struct {
- long callnum;
+ int callnum;
int args[16];
} a;
va_list ap;
@@ -852,7 +853,7 @@ void VM_LogSyscalls( int *args ) {
f = fopen("syscalls.log", "w" );
}
callnum++;
- fprintf(f, "%i: %li (%i) = %i %i %i %i\n", callnum, (long)( args - (int *)currentVM->dataBase ),
+ fprintf(f, "%i: %li (%i) = %i %i %i %i\n", callnum, (long)(args - (int *)currentVM->dataBase),
args[0], args[1], args[2], args[3], args[4] );
}
diff --git a/code/qcommon/vm_interpreted.c b/code/qcommon/vm_interpreted.c
index 619ee67..0d0d90f 100644
--- a/code/qcommon/vm_interpreted.c
+++ b/code/qcommon/vm_interpreted.c
@@ -310,7 +310,7 @@ locals from sp
#define DEBUGSTR va("%s%i", VM_Indent(vm), opStack-stack )
-int VM_CallInterpreted( vm_t *vm, long *args ) {
+int VM_CallInterpreted( vm_t *vm, int *args ) {
int stack[MAX_STACK];
int *opStack;
int programCounter;
diff --git a/code/qcommon/vm_local.h b/code/qcommon/vm_local.h
index 7df5ec1..f6fc043 100644
--- a/code/qcommon/vm_local.h
+++ b/code/qcommon/vm_local.h
@@ -168,10 +168,10 @@ extern vm_t *currentVM;
extern int vm_debugLevel;
void VM_Compile( vm_t *vm, vmHeader_t *header );
-int VM_CallCompiled( vm_t *vm, long *args );
+int VM_CallCompiled( vm_t *vm, int *args );
void VM_PrepareInterpreter( vm_t *vm, vmHeader_t *header );
-int VM_CallInterpreted( vm_t *vm, long *args );
+int VM_CallInterpreted( vm_t *vm, int *args );
vmSymbol_t *VM_ValueToFunctionSymbol( vm_t *vm, int value );
int VM_SymbolToValue( vm_t *vm, const char *symbol );
diff --git a/code/qcommon/vm_none.c b/code/qcommon/vm_none.c
index 2316386..c7e5ba0 100644
--- a/code/qcommon/vm_none.c
+++ b/code/qcommon/vm_none.c
@@ -1,6 +1,6 @@
#include "vm_local.h"
-int VM_CallCompiled( vm_t *vm, long *args ) {
+int VM_CallCompiled( vm_t *vm, int *args ) {
exit(99);
return 0;
}
diff --git a/code/qcommon/vm_ppc.c b/code/qcommon/vm_ppc.c
index 43d910d..a891ef6 100644
--- a/code/qcommon/vm_ppc.c
+++ b/code/qcommon/vm_ppc.c
@@ -1161,7 +1161,7 @@ VM_CallCompiled
This function is called directly by the generated code
==============
*/
-int VM_CallCompiled( vm_t *vm, long *args ) {
+int VM_CallCompiled( vm_t *vm, int *args ) {
int stack[1024];
int programStack;
int stackOnEntry;
diff --git a/code/qcommon/vm_x86.c b/code/qcommon/vm_x86.c
index 4f7bca0..a46161a 100644
--- a/code/qcommon/vm_x86.c
+++ b/code/qcommon/vm_x86.c
@@ -1101,7 +1101,7 @@ This function is called directly by the generated code
==============
*/
#ifndef DLL_ONLY // bk010215 - for DLL_ONLY dedicated servers/builds w/o VM
-int VM_CallCompiled( vm_t *vm, long *args ) {
+int VM_CallCompiled( vm_t *vm, int *args ) {
int stack[1024];
int programCounter;
int programStack;