mirror of
https://github.com/DrBeef/ioq3quest.git
synced 2024-11-12 23:54:07 +00:00
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.
This commit is contained in:
parent
534da92fc0
commit
d5fbff3f44
6 changed files with 10 additions and 9 deletions
|
@ -718,11 +718,12 @@ long QDECL VM_Call( vm_t *vm, long callnum, ... ) {
|
||||||
args[12], args[13], args[14], args[15]);
|
args[12], args[13], args[14], args[15]);
|
||||||
#if defined(HAVE_VM_COMPILED)
|
#if defined(HAVE_VM_COMPILED)
|
||||||
} else if ( 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
|
#endif
|
||||||
} else {
|
} else {
|
||||||
struct {
|
struct {
|
||||||
long callnum;
|
int callnum;
|
||||||
int args[16];
|
int args[16];
|
||||||
} a;
|
} a;
|
||||||
va_list ap;
|
va_list ap;
|
||||||
|
|
|
@ -310,7 +310,7 @@ locals from sp
|
||||||
|
|
||||||
#define DEBUGSTR va("%s%i", VM_Indent(vm), opStack-stack )
|
#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 stack[MAX_STACK];
|
||||||
int *opStack;
|
int *opStack;
|
||||||
int programCounter;
|
int programCounter;
|
||||||
|
|
|
@ -168,10 +168,10 @@ extern vm_t *currentVM;
|
||||||
extern int vm_debugLevel;
|
extern int vm_debugLevel;
|
||||||
|
|
||||||
void VM_Compile( vm_t *vm, vmHeader_t *header );
|
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 );
|
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 );
|
vmSymbol_t *VM_ValueToFunctionSymbol( vm_t *vm, int value );
|
||||||
int VM_SymbolToValue( vm_t *vm, const char *symbol );
|
int VM_SymbolToValue( vm_t *vm, const char *symbol );
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
#include "vm_local.h"
|
#include "vm_local.h"
|
||||||
|
|
||||||
int VM_CallCompiled( vm_t *vm, long *args ) {
|
int VM_CallCompiled( vm_t *vm, int *args ) {
|
||||||
exit(99);
|
exit(99);
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
|
@ -1161,7 +1161,7 @@ VM_CallCompiled
|
||||||
This function is called directly by the generated code
|
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 stack[1024];
|
||||||
int programStack;
|
int programStack;
|
||||||
int stackOnEntry;
|
int stackOnEntry;
|
||||||
|
|
|
@ -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
|
#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 stack[1024];
|
||||||
int programCounter;
|
int programCounter;
|
||||||
int programStack;
|
int programStack;
|
||||||
|
|
Loading…
Reference in a new issue