Fixed some egregious bugs

git-svn-id: http://picoc.googlecode.com/svn/trunk@72 21eae674-98b7-11dd-bd71-f92a316d2d60
This commit is contained in:
zik.saleeba 2009-02-10 22:25:20 +00:00
parent 2b1983b668
commit e348021c51
2 changed files with 3 additions and 2 deletions

View file

@ -138,9 +138,9 @@ int ParseValue(struct ParseState *Parser, struct Value **Result, int ResultOnHea
ProgramFail(Parser, "can't get the address of this"); ProgramFail(Parser, "can't get the address of this");
VariableStackPop(Parser, *Result); VariableStackPop(Parser, *Result);
*Result = VariableAllocValueFromType(Parser, Typ, TypeGetMatching(Parser, *Result, TypePointer, 0, StrEmpty)); *Result = VariableAllocValueFromType(Parser, TypeGetMatching(Parser, (*Result)->Typ, TypePointer, 0, StrEmpty), ResultOnHeap);
(*Result)->Val->Pointer.Segment = LocalLValue; (*Result)->Val->Pointer.Segment = LocalLValue;
(*Result)->Val->Pointer.Offset = 0; (*Result)->Val->Pointer.Data.Offset = 0;
break; break;
case TokenIdentifier: case TokenIdentifier:

View file

@ -231,6 +231,7 @@ void Parse(const char *FileName, const char *Source, int SourceLen, int RunIt);
void TypeInit(); void TypeInit();
int TypeSizeof(struct ValueType *Typ); int TypeSizeof(struct ValueType *Typ);
void TypeParse(struct ParseState *Parser, struct ValueType **Typ, const char **Identifier); void TypeParse(struct ParseState *Parser, struct ValueType **Typ, const char **Identifier);
struct ValueType *TypeGetMatching(struct ParseState *Parser, struct ValueType *ParentType, enum BaseType Base, int ArraySize, const char *Identifier);
/* intrinsic.c */ /* intrinsic.c */
void IntrinsicInit(struct Table *GlobalTable); void IntrinsicInit(struct Table *GlobalTable);