'out' or 'ref' usage in a cstype typemap in directors
'out' / 'ref' was not always stripped out in parts of the director code generation. Issue #1628
This commit is contained in:
parent
cb5d7398b5
commit
6fb345feb2
5 changed files with 98 additions and 4 deletions
|
|
@ -4064,11 +4064,10 @@ public:
|
|||
/* Get the C# parameter type */
|
||||
if ((tm = Getattr(p, "tmap:cstype"))) {
|
||||
substituteClassname(pt, tm);
|
||||
if (Strncmp(tm, "ref ", 4) == 0) {
|
||||
Replace(tm, "ref ", "", DOH_REPLACE_FIRST);
|
||||
int flags = DOH_REPLACE_FIRST | DOH_REPLACE_ID_BEGIN;
|
||||
if (Replace(tm, "ref ", "", flags) || Replace(tm, "ref\t", "", flags)) {
|
||||
Printf(proxy_method_types, "typeof(%s).MakeByRefType()", tm);
|
||||
} else if (Strncmp(tm, "out ", 4) == 0) {
|
||||
Replace(tm, "out ", "", DOH_REPLACE_FIRST);
|
||||
} else if (Replace(tm, "out ", "", flags) || Replace(tm, "out\t", "", flags)) {
|
||||
Printf(proxy_method_types, "typeof(%s).MakeByRefType()", tm);
|
||||
} else {
|
||||
Printf(proxy_method_types, "typeof(%s)", tm);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue