diff --git a/cmd/genbindings/emitcabi.go b/cmd/genbindings/emitcabi.go index 023324a5..7014f7e8 100644 --- a/cmd/genbindings/emitcabi.go +++ b/cmd/genbindings/emitcabi.go @@ -1305,6 +1305,11 @@ extern "C" { ret = strings.Replace(ret, classInherit.Class.ClassName+`::`, cppSubclassName(c)+`::`, -1) } + // The first instance of this class name change affected the very + // method we're going to call + // Undo it, but only once + ret = strings.Replace(ret, "->"+cppSubclassName(c), "->"+c.ClassName, 1) + return ret }