Repository navigation
Clean dllImport calls in Runtime - #403
Conversation
7d78a71 to
7403a3c
Compare
Codecov Report
@@ Coverage Diff @@
## master #403 +/- ##
=========================================
+ Coverage 63.38% 63.5% +0.11%
=========================================
Files 61 61
Lines 5277 5264 -13
Branches 863 861 -2
=========================================
- Hits 3345 3343 -2
+ Misses 1713 1701 -12
- Partials 219 220 +1
Continue to review full report at Codecov.
|
|
@vmuriart isn't explicit better than implicit? Can you at least add the docs which show the default calling conventions? |
|
Each commit message has a reference to the links. |
|
sorry, i still don't see any links. this SO answer mentions to declare cdecl: http://stackoverflow.com/a/15664100/2230844 |
|
I just realized you asked for the callingconventions one specifically, looks like i skipped that one sorry. In terms of explicit vs implicit. It's way overengineered, and makes the code less legible. I am all for including them if they are necessary but in most cases they aren't. Fixing the marshal issue became alot simpler after I completed this |
|
|
|
http://stackoverflow.com/a/6511236/5208670 suggest that we are ok without it. None of the calls python API that I've seen have |
|
BTW, default calling convention for pinvoke is stdcall, but cdecl is more compatible across various compilers. |
Not needed as Python doesn't define character specific functions https://msdn.microsoft.com/en-us/library/system.runtime.interopservices.dllimportattribute.exactspelling(v=vs.110).aspx
CharSet.Unicode is only needed when args are string type. https://msdn.microsoft.com/en-us/library/system.runtime.interopservices.dllimportattribute.charset(v=vs.110).aspx
Add remove full qualification
7403a3c to
5b3f58a
Compare
What does this implement/fix? Explain your changes.
Simplify calls to
dllImportby removing arguments that are default, not-applicable, or redundant.Does this close any currently open issues?
n/aAny other comments?
The clean-up exposes where CharSet is actually needed to marshal Strings.
Checklist
Check all those that are applicable and complete.
AUTHORSCHANGELOG