<html><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; ">I pulled down your bazaar branch and merged it with my own changes (I need to use the container methods, inplace numeric operators, and numeric operators with built in python &nbsp;types, so I have to keep using my changes for now), and now reference parameters are working just fine. &nbsp;Great!<div><br></div><div>Since the code I'm binding has probably thousands of reference parameters to expose, I've written little helper methods as shorthand for the long parameter definition. &nbsp;This is probably a little specialized for what you want, but it might be helpful to include something like these (akin to the "param" method you already have in utils):</div><div><br></div><div><div>def refparam(cppobj, argname):</div><div>&nbsp;&nbsp; &nbsp;return Parameter.new("%s&amp;" % cppobj, argname, direction=Parameter.DIRECTION_INOUT)</div><div><br></div><div>def constrefparam(cppobj, argname):</div><div>&nbsp;&nbsp; &nbsp;return Parameter.new(ref("const %s&amp;" % cppobj), argname, direction=Parameter.DIRECTION_INOUT)</div><div><br></div><div>So on those changes I have for the pybindgen code (allowing the stuff I mention above), I'd be happy to modify them to fit in better with how you want pybindgen to look if you'd like to give me an idea what you're looking for.</div><div><br><div><div><div>On Jun 30, 2009, at 6:29 AM, Gustavo Carneiro wrote:</div><br class="Apple-interchange-newline"><blockquote type="cite"><span class="Apple-style-span" style="border-collapse: separate; color: rgb(0, 0, 0); font-family: Helvetica; font-size: 12px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: 2; text-align: auto; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; -webkit-border-horizontal-spacing: 0px; -webkit-border-vertical-spacing: 0px; -webkit-text-decorations-in-effect: none; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0; "><br>Ah, right.&nbsp; The thing is, the code tries to make a copy of the object to give to the python wrapper in case it appears the python code kept a reference to the wrapper.<br><br>I need to fix pybindgen to, if the class has no copy constructor keep the wrapper->obj pointer NULL instead of giving it a copy.<br><br>The fix has been pushed to the bazaar branch.&nbsp; See<span class="Apple-converted-space">&nbsp;</span><a href="https:// code.launchpad.net/~gjc/pybindgen/trunk">https:// code.launchpad.net/~gjc/pybindgen/trunk</a><br></span></blockquote></div><br></div></div></div></body></html>