~drizzle-trunk/drizzle/development

« back to all changes in this revision

Viewing changes to drizzled/internal/iocache.h

  • Committer: Olaf van der Spek
  • Date: 2011-08-13 18:31:31 UTC
  • mto: This revision was merged to the branch mainline in revision 2407.
  • Revision ID: olafvdspek@gmail.com-20110813183131-tvp5kxqo9l4z82eo
Refactor iocache

Show diffs side-by-side

added added

removed removed

Lines of Context:
42
42
#define my_b_get(info) \
43
43
  ((info)->read_pos != (info)->read_end ? ((info)->read_pos++, (int) (unsigned char) (info)->read_pos[-1]) : (info)->get())
44
44
 
45
 
#define my_b_tell(info) ((info)->pos_in_file + \
46
 
                         (size_t) (*(info)->current_pos - (info)->request_pos))
 
45
#define my_b_tell(info) ((info)->tell())
47
46
 
48
47
#define my_b_bytes_in_cache(info) (size_t) (*(info)->current_end - *(info)->current_pos)
49
48
 
200
199
  {
201
200
    return buffer;
202
201
  }
 
202
 
 
203
  my_off_t tell() const
 
204
  {
 
205
    return pos_in_file + (*current_pos - request_pos);
 
206
  }
203
207
};
204
208
 
205
209
typedef io_cache_st IO_CACHE;    /* Used when cacheing files */