<br><br><div class="gmail_quote">On Fri, Apr 22, 2011 at 12:05 PM, Daniel Peebles <span dir="ltr">&lt;<a href="mailto:pumpkingod@gmail.com">pumpkingod@gmail.com</a>&gt;</span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">
calloc is just a multiplication followed by malloc followed by memset. Is it really worth creating a new binding for that? It always seemed like a bit of a silly API to me to begin with.<br></blockquote><div><br></div><div>
It doesn&#39;t have to be a binding.  If you&#39;d prefer to provide a Haskell implementation in terms of malloc/copyBytes that sounds fine too.  I wasn&#39;t sure how to best do that so a binding seemed the most straightforward.</div>
<div><br></div><div>Note that in my binding, I gave it the same type as malloc, which is to say it is always in terms of bytes.  The actual calloc api seems more like what we call mallocArray and I didn&#39;t personally need that functionality so I went for something that matched malloc.  I&#39;m flexible on that point.</div>
<div><br></div><div>Jason</div><div><br></div><div> </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;"><br><div class="gmail_quote"><div><div></div><div class="h5">
On Fri, Apr 22, 2011 at 12:08 PM, Jason Dagit <span dir="ltr">&lt;<a href="mailto:dagitj@gmail.com" target="_blank">dagitj@gmail.com</a>&gt;</span> wrote:<br>
</div></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div><div></div><div class="h5"><br><br><div class="gmail_quote"><div>On Fri, Apr 22, 2011 at 8:59 AM, Ian Lynagh <span dir="ltr">&lt;<a href="mailto:igloo@earth.li" target="_blank">igloo@earth.li</a>&gt;</span> wrote:<br>

<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<div>On Fri, Apr 22, 2011 at 07:20:55AM -0700, Jason Dagit wrote:<br>
&gt;<br>
&gt; That wiki page doesn&#39;t say how long the discussion period should be or give<br>
&gt; advice on how to determine the size.  What would you recommend for this<br>
&gt; patch?<br>
<br>
</div>I just updated the page to recommend 2 weeks, which I think is the<br>
status quo.<br>
<div><br>
&gt; So it sounds like the things I missed were:<br>
&gt;   * putting &quot;Proposal:&quot; in the subject line<br>
&gt;   * setting a discussion period<br>
&gt;   * attaching my patch to the trac instance (can I send a pull request on<br>
&gt; github instead?)<br>
<br>
</div>You don&#39;t need to make a trac ticket for it until the proposal has been<br>
accepted.<br></blockquote><div><br></div></div><div>Right, I did understand that.</div><div><div> </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<br>
Anything that means we see that the patch needs to be applied is OK.<br>
Currently pull requests don&#39;t get sent to the mailing list though, and<br>
there doesn&#39;t seem to be an easy way to set that up.<br></blockquote><div><br></div></div><div>Good to know.</div><div><div> </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">



<br>
<br>
I also didn&#39;t notice a rationale for the change. The type signatures<br>
looked the same as for the malloc functions, so I don&#39;t know what the<br>
difference is.<br></blockquote><div><br></div></div><div>The difference is that calloc will initialize the allocated memory to zeros.  Some C libraries assume this, at least freetype2 does, and since I want to use that library from Haskell I needed a binding to calloc.  I assume others will run into this need eventually as well.  When I send a &quot;proposal:...&quot; email, hopefully this weekend, I&#39;ll definitely make the rationale clear.</div>


<div><br></div><div>Thanks,</div><div>Jason</div></div>
<br></div></div><div class="im">_______________________________________________<br>
Libraries mailing list<br>
<a href="mailto:Libraries@haskell.org" target="_blank">Libraries@haskell.org</a><br>
<a href="http://www.haskell.org/mailman/listinfo/libraries" target="_blank">http://www.haskell.org/mailman/listinfo/libraries</a><br>
<br></div></blockquote></div><br>
</blockquote></div><br>