#2630 cmpi-devel: TypeMismatch exception using c-style strings and CmpiArray

Usability
pending-fixed
None
providers
5
2013-04-16
2013-04-15
No

Arrays of type CMPI_chars are created as type CMPI_string by SFCB under the covers. Data of either CMPI_string or CMPI_chars can be legally passed into addElement operations. However, using the C++ wrapper results in a type mismatch exception when using c-style strings. A previous fix in 2.0.3 added a CmpiString constructor, but the extra encapsulation is superfluous.

CmpiArray array = CmpiArray(MAX_SIZE, CMPI_chars);

// This works
array[0] = CmpiData(CmpiString("a doubly encapsulated string!");

// This throws an exception
array[1] = CmpiData("c-style string.");

Discussion

  • Tyrel Datwyler

    Tyrel Datwyler - 2013-04-16

    Committed to CVS Head

     
  • Tyrel Datwyler

    Tyrel Datwyler - 2013-04-16
    • status: open --> pending-fixed
     

Get latest updates about Open Source Projects, Conferences and News.

Sign up for the SourceForge newsletter:





No, thanks