albertodemichelis / squirrel

Official repository for the programming language Squirrel
http://www.squirrel-lang.org
MIT License
912 stars 156 forks source link

Documentation of sq_instanceof is wrong #263

Closed habi498 closed 1 year ago

habi498 commented 1 year ago

Returns: | SQTrue if the instance at position -2 in the stack is an instance of the class object at position -1 in the stack.

But in sq_api.cpp, i find that SQBool sq_instanceof(HSQUIRRELVM v) { SQObjectPtr &inst = stack_get(v,-1); SQObjectPtr &cl = stack_get(v,-2);

So instance must be at position -1 and class must be at -2. Please correct the documentation if possible.

albertodemichelis commented 1 year ago

fixed

habi498 commented 1 year ago

Thanks for fixing it in github. I hope it will be fixed in the online reference manual too.