if( type.GetTokenType() != ttVoid )
{
// Store the parameter type
func->parameterTypes.PushLast(type);
func->inOutFlags.PushLast(inOutFlags);
if( autoHandle && (!type.IsObjectHandle() || type.IsReference()) )
return asINVALID_DECLARATION;
if( paramAutoHandles ) paramAutoHandles->PushLast(autoHandle);
}
// Move to next parameter
n = n->next->next;
if( n && n->nodeType == snIdentifier )
n = n->next;
Bug Fix
Bug with register methods
Problem with registering functions as 'void func(void)'. AngelScript seems to treat this as a function with one parameter, thus not resolving calls to this function.
I fixed this bug, I'm not sure if it's the way you'd do it, but this now works properly. Starting at line 593:
I've only been looking through your code for about 30 minutes, so I'm not sure if this will break other things down the line.
Jeremy
Also I'm assuming this bug would be in other places such as registering class methods. So obviously there has to be a better place to do this (assuming in the parser). But since I don't have a very good knowledge of your code, I'm having trouble finding where this should actually be fixed at.
Thanks for the fix. It looks to be correct.
I'll verify if this needs to be added to other places as well.
Regards,
Andreas
I'll verify if this needs to be added to other places as well.
Regards,
Andreas
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
Popular Topics
Advertisement