YetAnotherForum
Welcome Guest Search | Active Topics | Log In | Register

sq_getinstanceup const correctness for typetag argument
Supertim
#1 Posted : Sunday, September 30, 2018 11:03:33 PM(UTC)
Rank: Newbie

Groups: Registered
Joined: 3/1/2016(UTC)
Posts: 5

Thanks: 0 times
Was thanked: 0 time(s) in 0 post(s)
Hi,

Current implementation of the getter for instance user pointer (sq_getinstanceup) lacks const correctness for typetag argument:

SQRESULT sq_getinstanceup(HSQUIRRELVM v, SQInteger idx, SQUserPointer *p,SQUserPointer typetag)

Considering the implementation does not (and I expect should not) modify the typetag argument or underlying value, would you be open to a PR to change it to the following?

SQRESULT sq_getinstanceup(HSQUIRRELVM v, SQInteger idx, SQUserPointer *p,const SQUserPointer typetag)

Other than this, I did not observe any similar discrepancies, but this one is jarring to implementations that treat typetags as constant pointers, at least in the context of getter calls.

Implementation link for convenience: https://github.com/alber...squirrel/sqapi.cpp#L810

Thanks
Users browsing this topic
Guest
Forum Jump  
You cannot post new topics in this forum.
You cannot reply to topics in this forum.
You cannot delete your posts in this forum.
You cannot edit your posts in this forum.
You cannot create polls in this forum.
You cannot vote in polls in this forum.

Clean Slate theme by Jaben Cargman (Tiny Gecko)
Powered by YAF 1.9.4 | YAF © 2003-2010, Yet Another Forum.NET
This page was generated in 0.060 seconds.