[Zorba-coders] [Bug 980463] Re: Using type_info::name() wrong

2012-06-13 Thread Dana Florescu
** Changed in: zorba
   Status: Fix Committed = Fix Released

-- 
You received this bug notification because you are a member of Zorba
Coders, which is the registrant for Zorba.
https://bugs.launchpad.net/bugs/980463

Title:
  Using type_info::name() wrong

Status in Zorba - The XQuery Processor:
  Fix Released

Bug description:
  In class_serializer.h,  the definition of the CHECK_CLASS_NAME macro:

#define CHECK_CLASS_NAME(class_name) \
if (ar.is_serializing_out()  !ar.is_serialize_base_class()) \
{ \
  assert(strstr(typeid(*this).name(), #class_name)); \
}

  The string returned by type_info::name() is implementation-dependent
  and has no guarantees about its content or format. In this case, you
  can not legitimately test to see, for some class type C, if
  typeid(C).name() contains the string literal C.

  However, you can legitimately compare two name() strings for equality.
  The above should be rewritten as:

  assert(::strcmp(typeid(*this).name(), typeid(class_name).name())
  == 0);

To manage notifications about this bug go to:
https://bugs.launchpad.net/zorba/+bug/980463/+subscriptions

-- 
Mailing list: https://launchpad.net/~zorba-coders
Post to : zorba-coders@lists.launchpad.net
Unsubscribe : https://launchpad.net/~zorba-coders
More help   : https://help.launchpad.net/ListHelp


[Zorba-coders] [Bug 980463] Re: Using type_info::name() wrong

2012-04-16 Thread Paul J. Lucas
** Changed in: zorba
   Status: In Progress = Fix Committed

-- 
You received this bug notification because you are a member of Zorba
Coders, which is the registrant for Zorba.
https://bugs.launchpad.net/bugs/980463

Title:
  Using type_info::name() wrong

Status in Zorba - The XQuery Processor:
  Fix Committed

Bug description:
  In class_serializer.h,  the definition of the CHECK_CLASS_NAME macro:

#define CHECK_CLASS_NAME(class_name) \
if (ar.is_serializing_out()  !ar.is_serialize_base_class()) \
{ \
  assert(strstr(typeid(*this).name(), #class_name)); \
}

  The string returned by type_info::name() is implementation-dependent
  and has no guarantees about its content or format. In this case, you
  can not legitimately test to see, for some class type C, if
  typeid(C).name() contains the string literal C.

  However, you can legitimately compare two name() strings for equality.
  The above should be rewritten as:

  assert(::strcmp(typeid(*this).name(), typeid(class_name).name())
  == 0);

To manage notifications about this bug go to:
https://bugs.launchpad.net/zorba/+bug/980463/+subscriptions

-- 
Mailing list: https://launchpad.net/~zorba-coders
Post to : zorba-coders@lists.launchpad.net
Unsubscribe : https://launchpad.net/~zorba-coders
More help   : https://help.launchpad.net/ListHelp


[Zorba-coders] [Bug 980463] Re: Using type_info::name() wrong

2012-04-13 Thread Paul J. Lucas
** Changed in: zorba
   Status: New = In Progress

-- 
You received this bug notification because you are a member of Zorba
Coders, which is the registrant for Zorba.
https://bugs.launchpad.net/bugs/980463

Title:
  Using type_info::name() wrong

Status in Zorba - The XQuery Processor:
  In Progress

Bug description:
  In class_serializer.h,  the definition of the CHECK_CLASS_NAME macro:

#define CHECK_CLASS_NAME(class_name) \
if (ar.is_serializing_out()  !ar.is_serialize_base_class()) \
{ \
  assert(strstr(typeid(*this).name(), #class_name)); \
}

  The string returned by type_info::name() is implementation-dependent
  and has no guarantees about its content or format. In this case, you
  can not legitimately test to see, for some class type C, if
  typeid(C).name() contains the string literal C.

  However, you can legitimately compare two name() strings for equality.
  The above should be rewritten as:

  assert(::strcmp(typeid(*this).name(), typeid(class_name).name())
  == 0);

To manage notifications about this bug go to:
https://bugs.launchpad.net/zorba/+bug/980463/+subscriptions

-- 
Mailing list: https://launchpad.net/~zorba-coders
Post to : zorba-coders@lists.launchpad.net
Unsubscribe : https://launchpad.net/~zorba-coders
More help   : https://help.launchpad.net/ListHelp


[Zorba-coders] [Bug 980463] Re: Using type_info::name() wrong

2012-04-12 Thread Paul J. Lucas
** Branch linked: lp:~paul-lucas/zorba/bug-980463

-- 
You received this bug notification because you are a member of Zorba
Coders, which is the registrant for Zorba.
https://bugs.launchpad.net/bugs/980463

Title:
  Using type_info::name() wrong

Status in Zorba - The XQuery Processor:
  New

Bug description:
  In class_serializer.h,  the definition of the CHECK_CLASS_NAME macro:

#define CHECK_CLASS_NAME(class_name) \
if (ar.is_serializing_out()  !ar.is_serialize_base_class()) \
{ \
  assert(strstr(typeid(*this).name(), #class_name)); \
}

  The string returned by type_info::name() is implementation-dependent
  and has no guarantees about its content or format. In this case, you
  can not legitimately test to see, for some class type C, if
  typeid(C).name() contains the string literal C.

  However, you can legitimately compare two name() strings for equality.
  The above should be rewritten as:

  assert(::strcmp(typeid(*this).name(), typeid(class_name).name())
  == 0);

To manage notifications about this bug go to:
https://bugs.launchpad.net/zorba/+bug/980463/+subscriptions

-- 
Mailing list: https://launchpad.net/~zorba-coders
Post to : zorba-coders@lists.launchpad.net
Unsubscribe : https://launchpad.net/~zorba-coders
More help   : https://help.launchpad.net/ListHelp