Remove unnecessary memory allocation from substituteResolvedType()
Don't allocate memory just to leak it, SwigType_typedef_resolve_all() already returns a copy we can use.
This commit is contained in:
parent
bf71891197
commit
dcda566ce6
1 changed files with 1 additions and 1 deletions
|
|
@ -304,7 +304,7 @@ public:
|
||||||
* ----------------------------------------------------------------------------- */
|
* ----------------------------------------------------------------------------- */
|
||||||
|
|
||||||
void substituteResolvedType(output_target target, SwigType *pt, String *tm) {
|
void substituteResolvedType(output_target target, SwigType *pt, String *tm) {
|
||||||
SwigType *type = Copy(SwigType_typedef_resolve_all(pt));
|
SwigType *type = SwigType_typedef_resolve_all(pt);
|
||||||
SwigType *strippedtype = SwigType_strip_qualifiers(type);
|
SwigType *strippedtype = SwigType_strip_qualifiers(type);
|
||||||
|
|
||||||
if (Strstr(tm, "$resolved_type")) {
|
if (Strstr(tm, "$resolved_type")) {
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue