[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Gnash-commit] /srv/bzr/gnash/rtmp r9784: end() returns the seek ptr now
From: |
rob |
Subject: |
[Gnash-commit] /srv/bzr/gnash/rtmp r9784: end() returns the seek ptr now. Handles uint32 now too. |
Date: |
Tue, 25 Nov 2008 21:53:45 -0700 |
User-agent: |
Bazaar (1.5) |
------------------------------------------------------------
revno: 9784
committer: address@hidden
branch nick: rtmp
timestamp: Tue 2008-11-25 21:53:45 -0700
message:
end() returns the seek ptr now. Handles uint32 now too.
modified:
libamf/buffer.cpp
libamf/buffer.h
=== modified file 'libamf/buffer.cpp'
--- a/libamf/buffer.cpp 2008-11-19 08:11:24 +0000
+++ b/libamf/buffer.cpp 2008-11-26 04:53:45 +0000
@@ -338,6 +338,19 @@
return append(ptr, sizeof(boost::uint16_t));
}
+/// \brief Append an integer to existing data in the buffer.
+///
+/// @param num A numeric integer value.
+///
+/// @return A reference to a Buffer.
+Buffer &
+Buffer::operator+=(boost::uint32_t length)
+{
+// GNASH_REPORT_FUNCTION;
+ Network::byte_t *ptr = reinterpret_cast<Network::byte_t *>(&length);
+ return append(ptr, sizeof(boost::uint32_t));
+}
+
/// \brief Append a Buffer class to existing data in the buffer.
///
/// @param buf A Buffer class containing the data to append.
=== modified file 'libamf/buffer.h'
--- a/libamf/buffer.h 2008-11-18 22:56:10 +0000
+++ b/libamf/buffer.h 2008-11-26 04:53:45 +0000
@@ -208,6 +208,13 @@
///
/// @return A reference to a Buffer.
Buffer &operator+=(double num);
+
+ /// \brief Append an integer to existing data in the buffer.
+ ///
+ /// @param num A numeric integer value.
+ ///
+ /// @return A reference to a Buffer.
+ Buffer &operator+=(boost::uint32_t length);
/// \brief Append a short to existing data in the buffer.
///
/// @param num A numeric short value.
@@ -281,8 +288,8 @@
/// Which is the base address plus the total size of the
/// Buffer.
///
- /// @return A real pointer to the last address of the Buffer.
- gnash::Network::byte_t *end() { return begin() + _nbytes; };
+ /// @return A real pointer to the last address of the Buffer with data.
+ gnash::Network::byte_t *end() { return _seekptr - 1; };
/// \brief Get the size of the Buffer.
///
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Gnash-commit] /srv/bzr/gnash/rtmp r9784: end() returns the seek ptr now. Handles uint32 now too.,
rob <=