~gcrosswhite/privateer/trunk

« back to all changes in this revision

Viewing changes to interfaces/null/test/A.h

  • Committer: Gregory Crosswhite
  • Date: 2009-04-20 08:18:04 UTC
  • Revision ID: gcross@phys.washington.edu-20090420081804-w930alxu97hg323h
Added another test, and made lots of changes to fix the bug it found with the way arrays are handled by adding a flag to let the processing code know when it is dealing with an array type and hence should not add the extra level of pointer indirection that it normally adds.  (The need to do this arises from the fact that C conflates pointers and arrays, so when returning a pointer to the start of the array you need to return the array variable itself and not its address, and likewise when accessing the array you just index it as normal and should *not* dereference it first.  Sigh...)

Show diffs side-by-side

added added

removed removed

Lines of Context:
34
34
enum Letter get_letter();
35
35
//@-node:gcross.20090419222611.11:enum initializer
36
36
//@+node:gcross.20090419222611.13:array initializer
37
 
enum Letter* get_letters();
 
37
enum Letter get_letters(int i);
38
38
//@-node:gcross.20090419222611.13:array initializer
39
39
//@+node:gcross.20090418183921.39:struct initializer
40
40
Mode get_global_struct_a();