int edict;
} prvm_eval_t;
-typedef struct prvm_required_field_s
+typedef struct prvm_required_field_s
{
int type;
const char *name;
// However, the first one should be preferred.
} priv;
// QuakeC fields (stored in dynamically resized array)
- union
+ union
{
void *vp;
entvars_t *server;
int edict_size; // in bytes
int edictareasize; // LordHavoc: in bytes (for bound checking)
+ int *statement_linenums; // NULL if not available
+
union {
float *generic;
globalvars_t *server;
int maxknownstrings;
int numknownstrings;
+ // this is updated whenever a string is removed or added
+ // (simple optimization of the free string search)
+ int firstfreeknownstring;
const char **knownstrings;
+ const char ***stringshash;
// all memory allocations related to this vm_prog (code, edicts, strings)
mempool_t *progs_mempool; // [INIT]
void PRVM_ED_PrintNum (int ent);
const char *PRVM_GetString(int num);
-int PRVM_SetQCString(const char *s);
int PRVM_SetEngineString(const char *s);
-char *PRVM_AllocString(int bufferlength);
-void PRVM_FreeString(char *s);
+int PRVM_AllocString(int bufferlength, char **pointer);
+void PRVM_FreeString(int num);
//============================================================================