~drizzle-trunk/drizzle/development

« back to all changes in this revision

Viewing changes to libdrizzle/column.c

  • Committer: Monty Taylor
  • Date: 2010-12-10 14:36:32 UTC
  • mto: (2023.3.15 innodb-cxx)
  • mto: This revision was merged to the branch mainline in revision 2014.
  • Revision ID: mordred@inaugust.com-20101210143632-6ucvr5sb4dnxwjv2
Fixed c++-compat warnings in libdrizzle.

Show diffs side-by-side

added added

removed removed

Lines of Context:
356
356
{
357
357
  if (column == NULL)
358
358
  {
359
 
    column= malloc(sizeof(drizzle_column_st));
 
359
    column= (drizzle_column_st *)malloc(sizeof(drizzle_column_st));
360
360
    if (column == NULL)
361
361
    {
362
362
      drizzle_set_error(result->con->drizzle, "drizzle_column_create",
459
459
  return _column_type_drizzle_map_from[column->type];
460
460
}
461
461
 
462
 
drizzle_column_flags_t drizzle_column_flags(drizzle_column_st *column)
 
462
int drizzle_column_flags(drizzle_column_st *column)
463
463
{
464
464
  return column->flags;
465
465
}
521
521
      return DRIZZLE_RETURN_OK;
522
522
    }
523
523
 
524
 
    result->column_buffer= malloc(sizeof(drizzle_column_st) *
525
 
                                  result->column_count);
 
524
    result->column_buffer= (drizzle_column_st *)malloc(sizeof(drizzle_column_st) *
 
525
                                                       result->column_count);
526
526
    if (result->column_buffer == NULL)
527
527
    {
528
528
      drizzle_set_error(result->con->drizzle, "drizzle_column_buffer",
685
685
}
686
686
 
687
687
void drizzle_column_set_flags(drizzle_column_st *column,
688
 
                              drizzle_column_flags_t flags)
 
688
                              int flags)
689
689
{
690
690
  column->flags= flags;
691
691
}
742
742
    /* EOF packet marking end of columns. */
743
743
    con->result->column= NULL;
744
744
    con->result->warning_count= drizzle_get_byte2(con->buffer_ptr + 1);
745
 
    con->status= drizzle_get_byte2(con->buffer_ptr + 3);
 
745
    con->status= (drizzle_con_status_t)drizzle_get_byte2(con->buffer_ptr + 3);
746
746
    con->buffer_ptr+= 5;
747
747
    con->buffer_size-= 5;
748
748
 
781
781
    column->size= drizzle_get_byte4(con->buffer_ptr + 3);
782
782
 
783
783
    if (con->options & DRIZZLE_CON_MYSQL)
784
 
      column->type= con->buffer_ptr[7];
 
784
      column->type= (drizzle_column_type_t)con->buffer_ptr[7];
785
785
    else
786
786
    {
787
 
      drizzle_type= con->buffer_ptr[7];
 
787
      drizzle_type= (drizzle_column_type_drizzle_t)con->buffer_ptr[7];
788
788
      if (drizzle_type >= DRIZZLE_COLUMN_TYPE_DRIZZLE_MAX)
789
789
        drizzle_type= DRIZZLE_COLUMN_TYPE_DRIZZLE_MAX;
790
790
      column->type= _column_type_drizzle_map_to[drizzle_type];