Using access masks on member functions

Started by
1 comment, last by WitchLord 9 years, 2 months ago

I'm trying to use access masks to expose a member function to only 1 type of module like this:


asIScriptEngine* pEngine = ...;

asDWORD uiAccessMask = pEngine->SetDefaultAccessMask( 2 );

pEngine->RegisterObjectMethod( "Entity", "int Get()", asMETHOD( Entity, Get ), asCALL_THISCALL );

pEngine->SetDefaultAccessMask( uiAccessMask );

The module being compiled has an access mask of 5, which is 1 (global access) and 4 (stuff specific to this module) , while the method uses an access mask of 2 (stuff specific to another module)

Yet, when i try to use the method in a module with an access mask of 5, it still compiles just fine.

This script compiles without errors:


void test(Entity@ ent)
{
	ent.Get();
}

According to this, i can use access masks on individual methods.

I dug through the compiler source code, and i didn't see any code that checks the access mask. Am i doing something wrong, or is this a bug?

Example program that shows the bug is included.

Advertisement

I'll investigate it. Thanks.

AngelCode.com - game development and more - Reference DB - game developer references
AngelScript - free scripting library - BMFont - free bitmap font generator - Tower - free puzzle game

I've fixed this in revision 2114.

Thanks

AngelCode.com - game development and more - Reference DB - game developer references
AngelScript - free scripting library - BMFont - free bitmap font generator - Tower - free puzzle game

This topic is closed to new replies.

Advertisement