-
-
Notifications
You must be signed in to change notification settings - Fork 422
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add Profiler methodmap #814
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This should apply to all similar new methodmaps.
plugins/include/profiler.inc
Outdated
|
||
/** | ||
* Starts profiling. | ||
* | ||
* @param prof Profiling object. | ||
* @error Invalid Handle. | ||
*/ | ||
native void StartProfiling(Handle prof); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thinking about changes like that - we don't have to change the tag here for old natives. This change will just make old code throw tag mismatch warnings if the profiler is just stored in a Handle variable.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Are you sure? I thought that was handled silently.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Just the other way around of expecting a Handle
param but passing a methodmap X < Handle
.
methodmap CoolNewThing < Handle {
};
native void DoStuff(CoolNewThing t);
native void DoMore(Handle t);
public void OnPluginStart()
{
Handle thing;
DoStuff(thing); // warning 213: tag mismatch
CoolNewThing newThing;
DoMore(newThing); // ok
}
thanks pm
My bad, thought those wouldn't throw mismatches. Hopefully all is well now. |
Across sm we use `//` for methodmap docs, so lets just keep this consistent
Think this is one of the last Handle types without a method map, decided to piece together a small patch to change that.