| 828 | } |
| 829 | |
| 830 | static int Stream_tostring(lua_State* L) |
| 831 | { |
| 832 | DM_LUA_STACK_CHECK(L, 1); |
| 833 | BufferStream* stream = CheckStream(L, 1); |
| 834 | dmBuffer::ValueType type; |
| 835 | uint32_t type_count; |
| 836 | dmBuffer::Result r = GetStreamType(stream->m_Buffer, stream->m_Name, &type, &type_count); |
| 837 | if( r == dmBuffer::RESULT_OK ) |
| 838 | lua_pushfstring(L, "%s.%s({ hash(\"%s\"), buffer.%s, %d })", SCRIPT_LIB_NAME, SCRIPT_TYPE_NAME_BUFFERSTREAM, dmHashReverseSafe64(stream->m_Name), dmBuffer::GetValueTypeString(type), type_count ); |
| 839 | else |
| 840 | lua_pushfstring(L, "%s.%s({ hash(\"%s\"), unknown, unknown })", SCRIPT_LIB_NAME, SCRIPT_TYPE_NAME_BUFFERSTREAM, dmHashReverseSafe64(stream->m_Name)); |
| 841 | return 1; |
| 842 | } |
| 843 | |
| 844 | static int Stream_len(lua_State* L) |
| 845 | { |
nothing calls this directly
no test coverage detected