Merged 2.056

This commit is contained in:
Alexey Prokhin
2011-12-02 21:50:52 +04:00
65 changed files with 6538 additions and 1122 deletions

View File

@@ -475,7 +475,7 @@ Module *Module::load(Loc loc, Identifiers *packages, Identifier *ident)
{
for (size_t i = 0; i < global.path->dim; i++)
{
char *p = global.path->tdata()[i];
char *p = (*global.path)[i];
char *n = FileName::combine(p, sdi);
if (FileName::exists(n))
{ result = n;
@@ -795,6 +795,11 @@ void Module::parse()
#endif
p.nextToken();
members = p.parseModule();
::free(srcfile->buffer);
srcfile->buffer = NULL;
srcfile->len = 0;
md = p.md;
numlines = p.loc.linnum;
@@ -855,7 +860,7 @@ void Module::importAll(Scope *prevsc)
// Add import of "object" if this module isn't "object"
if (ident != Id::object)
{
if (members->dim == 0 || members->tdata()[0]->ident != Id::object)
if (members->dim == 0 || ((*members)[0])->ident != Id::object)
{
Import *im = new Import(0, NULL, Id::object, NULL, 0);
members->shift(im);