chore(*): style
This commit is contained in:
parent
5844913102
commit
53ec9ee181
3 changed files with 4 additions and 1 deletions
|
|
@ -110,11 +110,12 @@ extern "C" object * lean_read_module_data(object * fname, object * w) {
|
|||
if (size < header_size) {
|
||||
return set_io_error(w, (sstream() << "failed to read file '" << olean_fn << "', invalid header").str());
|
||||
}
|
||||
char header[header_size];
|
||||
char * header = new char[header_size];
|
||||
in.read(header, header_size);
|
||||
if (strncmp(header, g_olean_header, header_size) != 0) {
|
||||
return set_io_error(w, (sstream() << "failed to read file '" << olean_fn << "', invalid header").str());
|
||||
}
|
||||
delete[] header;
|
||||
char * buffer = new char[size - header_size];
|
||||
in.read(buffer, size - header_size);
|
||||
if (!in) {
|
||||
|
|
|
|||
|
|
@ -7,6 +7,7 @@ Author: Leonardo de Moura
|
|||
#include <iostream>
|
||||
#include <chrono>
|
||||
#include <iomanip>
|
||||
#include <string>
|
||||
#include "runtime/object.h"
|
||||
#include "runtime/allocprof.h"
|
||||
namespace lean {
|
||||
|
|
|
|||
|
|
@ -5,6 +5,7 @@ Released under Apache 2.0 license as described in the file LICENSE.
|
|||
Author: Leonardo de Moura
|
||||
*/
|
||||
#pragma once
|
||||
#include <string>
|
||||
#include "runtime/object.h"
|
||||
namespace lean {
|
||||
obj_res set_io_result(obj_arg r, obj_arg a);
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue