mirror of
https://gitea.wildfiregames.com/0ad/0ad.git
synced 2026-06-28 16:26:50 +00:00
Replace JS_Enumerate with manual enumeration, to avoid its memory allocations.
Use LookupProperty to avoid having to check for getters. Add a quicker method of rooting many script values. This was SVN commit r7579.
This commit is contained in:
@@ -29,6 +29,8 @@
|
||||
#include "ScriptTypes.h"
|
||||
#include "ScriptVal.h"
|
||||
|
||||
class AutoGCRooter;
|
||||
|
||||
namespace boost { class rand48; }
|
||||
|
||||
// Set the maximum number of function arguments that can be handled
|
||||
@@ -37,7 +39,6 @@ namespace boost { class rand48; }
|
||||
#define SCRIPT_INTERFACE_MAX_ARGS 6
|
||||
|
||||
struct ScriptInterface_impl;
|
||||
class ScriptClass;
|
||||
class ScriptInterface
|
||||
{
|
||||
public:
|
||||
@@ -181,6 +182,8 @@ public:
|
||||
bool AddRoot(void* ptr, const char* name);
|
||||
bool RemoveRoot(void* ptr);
|
||||
|
||||
AutoGCRooter* ReplaceAutoGCRooter(AutoGCRooter* rooter);
|
||||
|
||||
/**
|
||||
* Dump some memory heap debugging information to stderr.
|
||||
*/
|
||||
|
||||
Reference in New Issue
Block a user