hi, i've just been tinkering with pyrex, trying to do this (below).<br>but it segfaults on the sscanf line in pyscanf. <br>what am i doing wrong? is this more involved than my naive approach? <br><br>thanks,<br>-brent<br>
<br>##############################<br># pyscanf.pyx<br><br>cdef extern from &quot;stdio.h&quot;:<br>&nbsp;&nbsp;&nbsp; int sscanf (char *,char *,...)<br><br>def pyscanf(char * str):<br>&nbsp;&nbsp;&nbsp; cdef char * q<br>&nbsp;&nbsp;&nbsp; cdef char * s<br>&nbsp;&nbsp;&nbsp; cdef int my_int
<br>&nbsp;&nbsp;&nbsp; cdef float my_float
<br>&nbsp;&nbsp;&nbsp; sscanf(str,&quot;%s %s %i %f&quot;,q,s,&amp;my_int,&amp;my_float)<br>&nbsp;&nbsp;&nbsp; return [q,s,my_int,my_float]<br><br><br>####### run with ###########<br>from pyscanf import pyscanf<br>print pyscanf(&quot;asdf asdf 123 
12.22&quot;)