Skip to Content.
Sympa Menu

mace-opensaml-users - RE: ArrayIterator bug?

Subject: OpenSAML user discussion

List archive

RE: ArrayIterator bug?


Chronological Thread 
  • From: Scott Cantor <>
  • To: ,
  • Subject: RE: ArrayIterator bug?
  • Date: Tue, 18 May 2004 16:56:42 -0400
  • Organization: The Ohio State University

> this is either a bug or a usage misunderstanding on my part :)

It's partly the awkward API, which I fixed in Java by adding methods like
addStatement, but didn't add to the C++ yet. It's a fair bit of code
supporting post-constructor modify methods.

> the issue is that sizeof(v) evaluates to the size of the
> pointer not to the number of elements in the array. is this
> misuse on my part or indeed a bug? (i've looked through the
> rest of the source code and never see an array size larger
> than one being passed to this constructor)

Right, I fixed this bug before I branched 1.0 by adding a size parameter to
the ArrayIterator constructor, so you'd just pass in a 2. The code you cite
is outdated and wouldn't even compile now.

> lastly, am i heading down the right path in the first place
> towards my goal? i.e., is feeding two statements to the
> SAMLAssertion constructor a proper/intended mechanism? (is

Yep, for now, that's the only way. Or you can build a std::vector, add
statement pointers to it, and then pass the vector in, where it will be
turned into a temp Iterator object. They amount to about the same thing,
because the ArrayIterator just pushes the array entries onto a vector
anyway.

-- Scott



  • ArrayIterator bug?, david_casper, 05/18/2004
    • RE: ArrayIterator bug?, Scott Cantor, 05/18/2004

Archive powered by MHonArc 2.6.16.

Top of Page