From 4c18f4686071c37b9dc069cde4d2c7972265370a Mon Sep 17 00:00:00 2001 From: Borja Ferrer Date: Mon, 7 Aug 2006 22:40:43 +0000 Subject: [PATCH] changed flags added 2 more error types --HG-- extra : convert_revision : svn%3A39bc706e-5318-0410-9160-8a85361fbb7c/trunk%4064 --- sourcepawn/include/sp_file_headers.h | 6 +----- sourcepawn/include/sp_vm_types.h | 9 +++++---- 2 files changed, 6 insertions(+), 9 deletions(-) diff --git a/sourcepawn/include/sp_file_headers.h b/sourcepawn/include/sp_file_headers.h index a390a653..ec2ffaa3 100644 --- a/sourcepawn/include/sp_file_headers.h +++ b/sourcepawn/include/sp_file_headers.h @@ -57,11 +57,7 @@ typedef struct sp_file_hdr_s uint32_t dataoffs; /* offset to file proper (any compression starts here) */ } sp_file_hdr_t; -typedef enum -{ - SP_FILE_NONE = 0, - SP_FILE_DEBUG = 1, -} sp_file_flags_t; +#define SP_FLAG_DEBUG (1<<0) /* section is ".code" */ typedef struct sp_file_code_s diff --git a/sourcepawn/include/sp_vm_types.h b/sourcepawn/include/sp_vm_types.h index fa8aed3e..f3f9c618 100644 --- a/sourcepawn/include/sp_vm_types.h +++ b/sourcepawn/include/sp_vm_types.h @@ -17,11 +17,13 @@ typedef int32_t cell_t; #define SP_ERR_INVALID_ADDRESS 5 /* A memory address was not valid */ #define SP_ERR_NOT_FOUND 6 /* The object in question was not found */ #define SP_ERR_INDEX 7 /* Invalid index parameter */ +#define SP_ERR_NATIVE_PENDING 8 /* A script tried to exec an unbound native */ +#define SP_ERR_STACKERR 9 /* Stack/Heap collision */ /********************************************** *** The following structures are reference structures. *** They are not essential to the API, but are used - *** to hold the backend database format of the plugin + *** to hold the back end database format of the plugin *** binary. **********************************************/ @@ -78,7 +80,7 @@ typedef struct sp_plugin_s } sp_plugin_t; struct sp_context_s; -typedef int (*SPVM_NATIVE_FUNC)(struct sp_context_s *, cell_t *); +typedef cell_t (*SPVM_NATIVE_FUNC)(struct sp_context_s *, cell_t *); /********************************************** *** The following structures are bound to the VM/JIT. @@ -210,6 +212,5 @@ typedef struct sp_context_s sp_debug_line_t *lines; /* lines */ sp_debug_symbol_t *symbols; /* symbols */ } sp_context_t; - -#endif //_INCLUDE_SOURCEPAWN_VM_TYPES_H +#endif //_INCLUDE_SOURCEPAWN_VM_TYPES_H