int* num = new num;engine->RegisterGlobalProperty("int num", num);
The only way I see this to be currently possible is the following:
int ptoi(int* num) return *num;...int* num = new num;engine->RegisterObjectType("intp", sizeof(int*), 0);engine->RegisterGlobalProperty("intp num", #);engine->RegisterGlobalFunction("int valueof(intp)", asFUNCTION(ptoi), asCALL_CDECL);
This isn't the cleanest approach, but it should work. There's probably some way to automate this, but I can't currently think of any. Maybe using a special function to register the pointer of a pointer?
Here's the code for my modifications, simply extract to the angelscript root dir: http://users.pandora.be/gyrbo-be/AS/AngelScript-bytecode.tar.bz2