<br><br><div class="gmail_quote">On Mon, Jul 4, 2011 at 3:42 AM, vikash agrawal <span dir="ltr">&lt;<a href="mailto:vikashagrawal1990@gmail.com">vikashagrawal1990@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;">

Hello Everyone,<br><br>Finally, first month of my GSoC has been over and it was surely full of up&#39;s and down&#39;s. So far I have understood the complex code generation involving various cases, complex types etc over the past. And I guess this was the perfect way to start to my project as this gave me a fair idea of  any hacks that I try to bring in the code. [ Thanks Josh for suggesting me this way start my work on the project ]<br>


<br>Also it has been long I am trying to patch a bug, I had several discussion with pharris ( I apologise for pestering you so much ) over the same. I am still studying c_client.py and a quick glance of it reveals &#39;_c_serialize_helper_insert_  function&#39;, with context being sizeof, is responsible for xcb_str_sizeof in xproto.c. So I believe this might need some hacks.<br>


Also, if I am not wrong there is a problem with xcb_str_next with respect master and 1.7, but for this I have a very n00b and basic idea like if self.c_next_name == &#39;xcb_str_next&#39;: # and then necessary conditions of _c(&#39;whatever&#39;); might solve the purpose. If this feels a way then can we specifically do the same for other buggy issues.<br>


<br>Along with this, can there be a way in which I can find if the type is a string and then explicitly handle the padding, <br>Please help me on the bug :(<br><br>Also many a time I felt this weird issue, if I try to print any variable in c_client.py,the output came only for a couple of files like xkb.xml and one or two more, also whenever I tried to have _c(printf(&#39;blah blah&#39;); ) I recvied hell lot of warnings<br>


<br>Finally, if I make some hacks, how do I finally test the code, if things went right or not.<br><br>Expecting a reply very soon :)<br><br>And wish me luck, 1st assessment a week away and I am damn scared, this being my first GSoC and a project at this scale<br>


<br>Love <br><font color="#888888"><br>Vikash Agrawal<br><br></font></blockquote><div><br>Ah, I forgot to mention, I compiled the attached utility and found<b> no difference</b> is the output is master and tag 1.7. so what this utility signifies ?<br>

 <br></div></div>Also, when I see the function<br><br>int<br>xcb_str_sizeof (const void  *_buffer  /**&lt; */)<br>{<br>    char *xcb_tmp = (char *)_buffer;<br>    const xcb_str_t *_aux = (xcb_str_t *)_buffer;<br>    unsigned int xcb_buffer_len = 0;<br>

    unsigned int xcb_block_len = 0;<br>    unsigned int xcb_pad = 0;<br><br><br>    xcb_block_len += sizeof(xcb_str_t);<br>    xcb_tmp += xcb_block_len;<br>    /* name */<br>    <b>xcb_block_len += _aux-&gt;name_len * sizeof(char);</b> <b> <br>

// What is this?</b><br><br>    xcb_tmp += xcb_block_len;<br>    /* insert padding */<br>    <b><br>   xcb_pad = -xcb_block_len &amp; 3; <br> // What is this?</b><br><br>    xcb_buffer_len += xcb_block_len + xcb_pad;<br>
    if (0 != xcb_pad) {<br>
        xcb_tmp += xcb_pad;<br>        xcb_pad = 0;<br>    }<br>    xcb_block_len = 0;<br><br>    return xcb_buffer_len;<br>}<br><br>I don&#39;t think there is a logical error here <br><br>and glancing on functions <br><br>

1) In master<br><br>void<br>xcb_str_next (xcb_str_iterator_t *i  /**&lt; */)<br>{<br>    xcb_str_t *R = i-&gt;data;<br>    xcb_generic_iterator_t child;<br><b>    child.data = (xcb_str_t *)(((char *)R) + xcb_str_sizeof(R));</b><br>

<b>// here as I see, xcb_str_sizeof(R) is explicitly called so, this might be the root cause of the issue, and using if else <br>// constructs if we try to get the code given belo (1.7 ) what are the issues that are likely to faced? <br>

// I feel, we dont call the xcb_str_sizeof() explicitly then I think there will issue in findinf the next offset for the iterator. so<br>// instead, can there be a way, in which we can fint that if its a string</b>, <b>we call a function say xcb_str_next_string () which <br>

// would be similar to one given below and in rest cases it would call xcb_str_next</b><br>  <br> i-&gt;index = (char *) child.data - (char *) i-&gt;data;<br>    --i-&gt;rem;<br>    i-&gt;data = (xcb_str_t *) child.data;<br>

}<br><br><br>2) in 1.7<br><br>void<br>xcb_str_next (xcb_str_iterator_t *i  /**&lt; */)<br>{<br>    xcb_str_t *R = i-&gt;data;<br>    xcb_generic_iterator_t child = xcb_str_name_end(R);<br>    --i-&gt;rem;<br>    i-&gt;data = (xcb_str_t *) child.data;<br>

    i-&gt;index = child.index;<br>}<br><br>Please reply to this and guide me if I going wrong or being just a n00b :(<br><br>Love <br><br>Vikash Agrawal<br>