Jump to content
  • Advertisement
Sign in to follow this  
Solokiller

Using access masks on member functions

This topic is 1246 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

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.

Share this post


Link to post
Share on other sites
Advertisement
Sign in to follow this  

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

Participate in the game development conversation and more when you create an account on GameDev.net!

Sign me up!