gets a stream from a buffer * * Get a specified stream from a buffer. * * @name buffer.get_stream * @param buffer [type:buffer] the buffer to get the stream from * @param stream_name [type:hash|string] the stream name * @return stream [type:bufferstream] the data stream */
| 431 | * @return stream [type:bufferstream] the data stream |
| 432 | */ |
| 433 | static int GetStream(lua_State* L) |
| 434 | { |
| 435 | DM_LUA_STACK_CHECK(L, 1); |
| 436 | dmBuffer::HBuffer hbuffer = dmScript::CheckBufferUnpack(L, 1); |
| 437 | dmhash_t stream_name = dmScript::CheckHashOrString(L, 2); |
| 438 | PushStream(L, 1, hbuffer, stream_name); |
| 439 | return 1; |
| 440 | } |
| 441 | |
| 442 | // Offsets and count is in "value type" |
| 443 | template<typename T> |