title: SWIG typedef recognition
body: <p>I am trying too use my C++ class in PHP. in my C++ code I have declared the typedef as:</p>
  
  <pre><code>typedef unsigned char byte;
  </code></pre>
  
  <p>so I intended to let SWIG consider my typedef in wrapper class, my interface file is something like this:</p>
  
  <pre><code>%module xxx
  
  typedef unsigned char byte;
  
  %include "xxx.h"
  
  ....
  
  %{
  
  typedef unsigned char byte;
  
  #include "xxx.h"
  
  %}
  </code></pre>
  
  <p>and in my test code I refer to type as:</p>
  
  <pre><code>byte *data;
  </code></pre>
  
  <p>but I've got the following error:</p>
  
  <pre class="lang-none prettyprint-override"><code>Fatal error: Class 'unsigned_char' not found in xxx.php
  </code></pre>
  
  <p>P.S: I also include "stdint.i" in my interface file but got the same error</p>
  
  <p>Any ideas? </p>