History

Basic implementation of Sys module functions - Sys.create, Sys.open, Sys.read, Sys.write - Sys.tokenize

Code analysis violations Bug in scheduler - race during with worker thread shutdown.

arr committed 10 years ago

Commit 992a33f1 parent 6d77c2d18 files · +695 −243Browse files

Showing the changes to src/vm/module_reader.cpp (1 of 18 files). Show all

Unified · Split

src/vm/module_reader.cpp+4−4
@@ -392,8 +392,8 @@ namespace · 391 unmodified lines
392392 auto base = reinterpret_cast<byte_t *>(modobj.original_mp->get_allocation());
393393 for (;;)
394394 {
395− auto bytesRead = reader.get_next_bytes(sizeof(code), &code);
396− if (bytesRead != sizeof(code)) throw module_reader_exception{ "Failed to read data item code" };
395+ auto bytes_read = reader.get_next_bytes(sizeof(code), &code);
396+ if (bytes_read != sizeof(code)) throw module_reader_exception{ "Failed to read data item code" };
397397 if (code == 0)
398398 break;
399399
@@ -444,8 +444,8 @@ namespace · 44 unmodified lines
444444 case datum_type_t::utf_string:
445445 {
446446 auto str_buffer = std::vector<uint8_t>(count);
447− auto bytesRead = reader.get_next_bytes(count, str_buffer.data());
448− if (bytesRead != count)
447+ auto str_bytes = reader.get_next_bytes(count, str_buffer.data());
448+ if (str_bytes != count)
449449 throw module_reader_exception{ "Failed to read string data" };
450450
451451 auto new_string = new vm_string_t(str_buffer.size(), str_buffer.data());