From 5e64c4d92f109638111d78b6ab97feb645ee0a01 Mon Sep 17 00:00:00 2001 From: Andrew Kelley Date: Wed, 6 Jan 2016 04:41:11 -0700 Subject: support pub structs. move rand to std lib. guess number example prints the answer now --- src/codegen.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src/codegen.cpp') diff --git a/src/codegen.cpp b/src/codegen.cpp index a69f9e30b8..f87ca7ef24 100644 --- a/src/codegen.cpp +++ b/src/codegen.cpp @@ -2164,7 +2164,7 @@ static ImportTableEntry *codegen_add_code(CodeGen *g, Buf *abs_full_path, assert(proto_node->type == NodeTypeFnProto); Buf *proto_name = &proto_node->data.fn_proto.name; - bool is_private = (proto_node->data.fn_proto.visib_mod == FnProtoVisibModPrivate); + bool is_private = (proto_node->data.fn_proto.visib_mod == VisibModPrivate); if (buf_eql_str(proto_name, "main") && !is_private) { g->have_exported_main = true; @@ -2287,7 +2287,7 @@ static void generate_h_file(CodeGen *g) { assert(proto_node->type == NodeTypeFnProto); AstNodeFnProto *fn_proto = &proto_node->data.fn_proto; - if (fn_proto->visib_mod != FnProtoVisibModExport) + if (fn_proto->visib_mod != VisibModExport) continue; Buf return_type_c = BUF_INIT; -- cgit v1.2.3