@@ -295,20 +295,20 @@ typedef boost::shared_ptr<InputBuffer> InputBufferPtr;
295295// / // pass the buffer to a DNS message object to construct a wire-format
296296// / // DNS message.
297297// / struct sockaddr to;
298- // / sendto(s, buffer.getDataAsVP (), buffer.getLength(), 0, &to, sizeof(to));
298+ // / sendto(s, buffer.getDataAsVoidPtr (), buffer.getLength(), 0, &to, sizeof(to));
299299// / @endcode
300300// /
301- // / where the @c getData() method gives a reference to the internal
302- // / memory region stored in the @c buffer object. This is a
303- // / suboptimal design in that it exposes an encapsulated "handle" of
304- // / an object to its user. Unfortunately, there is no easy way to
305- // / avoid this without involving expensive data copy if we want to use
306- // / this object with a legacy API such as a BSD socket interface.
307- // / And, indeed, this is one major purpose for this object.
308- // / Applications should use this method only under such a special
309- // / circumstance. It should also be noted that the memory region
310- // / returned by @c getData() may be invalidated after a subsequent
311- // / write operation.
301+ // / where the @c getData() (in fact @getDataAsVoidPtr()) method gives
302+ // / a reference to the internal memory region stored in the @c buffer
303+ // / object. This is a suboptimal design in that it exposes an
304+ // / encapsulated "handle" of an object to its user. Unfortunately,
305+ // / there is no easy way to avoid this without involving expensive
306+ // / data copy if we want to use this object with a legacy API such as
307+ // / a BSD socket interface. And, indeed, this is one major purpose
308+ // / for this object. Applications should use this method only under
309+ // / such a special circumstance. It should also be noted that the
310+ // / memory region returned by @c getData() may be invalidated after a
311+ // / subsequent write operation.
312312// /
313313// / An @c OutputBuffer class object automatically extends its memory
314314// / region when data is written beyond the end of the current buffer.
@@ -404,7 +404,7 @@ class OutputBuffer {
404404 }
405405
406406 // / @brief Return data as a pointer to void.
407- const void * getDataAsVP () const {
407+ const void * getDataAsVoidPtr () const {
408408 return (static_cast <const void *>(getData ()));
409409 }
410410
0 commit comments