~drizzle-trunk/drizzle/development

« back to all changes in this revision

Viewing changes to server/protocol.cc

  • Committer: Brian Aker
  • Date: 2008-07-13 22:45:08 UTC
  • Revision ID: brian@tangent.org-20080713224508-hb20z4okblotb39a
longlong replacement

Show diffs side-by-side

added added

removed removed

Lines of Context:
444
444
  return to+length;
445
445
}
446
446
 
447
 
uchar *net_store_data(uchar *to,longlong from)
 
447
uchar *net_store_data(uchar *to,int64_t from)
448
448
{
449
449
  char buff[22];
450
 
  uint length=(uint) (longlong10_to_str(from,buff,10)-buff);
 
450
  uint length=(uint) (int64_t10_to_str(from,buff,10)-buff);
451
451
  to=net_store_length_fast(to,length);
452
452
  memcpy(to,buff,length);
453
453
  return to+length;
730
730
}
731
731
 
732
732
 
733
 
bool Protocol_text::store_tiny(longlong from)
 
733
bool Protocol_text::store_tiny(int64_t from)
734
734
{
735
735
  char buff[20];
736
736
  return net_store_data((uchar*) buff,
738
738
}
739
739
 
740
740
 
741
 
bool Protocol_text::store_short(longlong from)
 
741
bool Protocol_text::store_short(int64_t from)
742
742
{
743
743
  char buff[20];
744
744
  return net_store_data((uchar*) buff,
747
747
}
748
748
 
749
749
 
750
 
bool Protocol_text::store_long(longlong from)
 
750
bool Protocol_text::store_long(int64_t from)
751
751
{
752
752
  char buff[20];
753
753
  return net_store_data((uchar*) buff,
756
756
}
757
757
 
758
758
 
759
 
bool Protocol_text::store_longlong(longlong from, bool unsigned_flag)
 
759
bool Protocol_text::store_int64_t(int64_t from, bool unsigned_flag)
760
760
{
761
761
  char buff[22];
762
762
  return net_store_data((uchar*) buff,
763
 
                        (size_t) (longlong10_to_str(from,buff,
 
763
                        (size_t) (int64_t10_to_str(from,buff,
764
764
                                                    unsigned_flag ? 10 : -10)-
765
765
                                  buff));
766
766
}