summaryrefslogtreecommitdiff
path: root/usr/gri/pretty/globals.go
diff options
context:
space:
mode:
Diffstat (limited to 'usr/gri/pretty/globals.go')
-rw-r--r--usr/gri/pretty/globals.go18
1 files changed, 9 insertions, 9 deletions
diff --git a/usr/gri/pretty/globals.go b/usr/gri/pretty/globals.go
index d1dc47cb0..e51bfb14d 100644
--- a/usr/gri/pretty/globals.go
+++ b/usr/gri/pretty/globals.go
@@ -57,7 +57,7 @@ export type Package struct {
export type Scope struct {
parent *Scope;
- entries *map[string] *Object;
+ entries map[string] *Object;
}
@@ -72,15 +72,15 @@ export type Environment struct {
export type OldCompilation struct {
// environment
env *Environment;
-
+
// TODO rethink the need for this here
src_file string;
src string;
-
+
// Error handling
nerrors int; // number of errors reported
errpos int; // last error position
-
+
// TODO use open arrays eventually
pkg_list [256] *Package; // pkg_list[0] is the current package
pkg_ref int;
@@ -119,7 +119,7 @@ export type Elem struct {
export var Universe_void_typ *Type // initialized by Universe to Universe.void_typ
export func NewObject(pos, kind int, ident string) *Object {
- obj := new(Object);
+ obj := new(*Object);
obj.exported = false;
obj.pos = pos;
obj.kind = kind;
@@ -131,7 +131,7 @@ export func NewObject(pos, kind int, ident string) *Object {
export func NewType(form int) *Type {
- typ := new(Type);
+ typ := new(*Type);
typ.ref = -1; // not yet exported
typ.form = form;
return typ;
@@ -139,7 +139,7 @@ export func NewType(form int) *Type {
export func NewPackage(file_name string, obj *Object, scope *Scope) *Package {
- pkg := new(Package);
+ pkg := new(*Package);
pkg.ref = -1; // not yet exported
pkg.file_name = file_name;
pkg.key = "<the package key>"; // empty key means package forward declaration
@@ -150,7 +150,7 @@ export func NewPackage(file_name string, obj *Object, scope *Scope) *Package {
export func NewScope(parent *Scope) *Scope {
- scope := new(Scope);
+ scope := new(*Scope);
scope.parent = parent;
scope.entries = new(map[string]*Object, 8);
return scope;
@@ -161,7 +161,7 @@ export func NewScope(parent *Scope) *Scope {
// Object methods
func (obj *Object) Copy() *Object {
- copy := new(Object);
+ copy := new(*Object);
copy.exported = obj.exported;
copy.pos = obj.pos;
copy.kind = obj.kind;