<div class="gmail_quote">On Mon, Mar 19, 2012 at 10:44 AM, Anders Waldenborg <span dir="ltr"><<a href="mailto:anders@0x63.nu">anders@0x63.nu</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<br>
* Auto generated vs manual ctypes declarations.<br></blockquote><div><br>This is purely a cosmetic difference, as we both take the same approach of registering functions on a global/shared ctypes library instance. I think automatic is the way to go (just as long as the automatically generated code is easy to diff when they are regenerated).<br>
<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">

* Use of constructor vs "new" static methods.<br>
<br>
  When using the bindings one never initializes the class manually.<br>
  Instead a "factory" method is used:<br>
<br>
  mymod = Module.from_file(...)<br>
  mymod = Module.from_data(...)<br>
  mymod = Module.new("foo")<br>
  ity = Type.int(32)<br>
<br>
  instead of<br>
<br>
  mymod = Module(file=...)<br>
  mymod = Module(data=...)<br>
  mymod = Module(name="foo")<br>
  ity = IntType(32)<br></blockquote><div><br>Yeah, Module is an example where the number of named arguments is pretty overwhelming. I was probably going to create static methods for Module creation. Whether I was going to leave the named arguments on the constructor is an open issue. I don't think it matters too much.<br>
 <br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"> 
 Also this makes it consistent with the old defuct llvm-py bindings.<br></blockquote><div><br>I'm not too concerned about this consistency. llvm-py began many years ago. Assumptions may be different now. I think we should do what makes sense today. If that is the same great. If not, oh well.<br>
 </div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">
  (partially this also is a consequence of the fact that my bindings<br>
   inherits from c_void_p making it a bit messier)<br></blockquote><div><br>Yup :) Since I started without this inheritance restriction, I was able to go with what I consider a more "Pythonic" approach: initializers. <br>
</div><div><br> </div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"> 
My bindings have python/bindings/lib/llvm<br>
                                  /tests<br>
                                  /tools<br>
<br>
  I do like having the tests outside the dir.<br></blockquote><div><br>I have no major opinion on this.<br><br>In related news, I see you have received commit access, Anders. Congratulations! We just need to figure out this review/module owner situation...<br>
<br>Gregory<br></div></div><br>