X-Git-Url: https://ecere.com/cgi-bin/gitweb.cgi?a=blobdiff_plain;f=compiler%2Flibec%2Fsrc%2Fpass3.ec;h=b4a84bc0b947782006199e105b8a8419a198091a;hb=981767e16256c835738562f4280e06140dcc0067;hp=dcc2c96afe7b65d16b003538a1f09be1fca9e2f3;hpb=e7b42957b2d50332e1d40f4c692ca7d183426690;p=sdk diff --git a/compiler/libec/src/pass3.ec b/compiler/libec/src/pass3.ec index dcc2c96..b4a84bc 100644 --- a/compiler/libec/src/pass3.ec +++ b/compiler/libec/src/pass3.ec @@ -7,7 +7,7 @@ extern External curExternal; ///////////////// INSTANCE DECLARATION PASS /////////////////////// // Returns true if we should add a * to the declarator -static bool ReplaceClassSpec(OldList specs, Specifier spec, bool param) +static int ReplaceClassSpec(OldList specs, Specifier spec, bool param) { if(spec.type == templateTypeSpecifier) { @@ -31,7 +31,7 @@ static bool ReplaceClassSpec(OldList specs, Specifier spec, bool param) if(decl) FreeDeclarator(decl); if(isPointer) - return true; + return 1; } } else if(!param && parameter.dataType) @@ -49,7 +49,7 @@ static bool ReplaceClassSpec(OldList specs, Specifier spec, bool param) { bool isPointer = decl.type == pointerDeclarator; if(isPointer) - return true; + return 1; } } else @@ -153,7 +153,7 @@ static bool ReplaceClassSpec(OldList specs, Specifier spec, bool param) { spec.type = baseSpecifier; spec.specifier = VOID; - return true; + return 1; } } else @@ -168,9 +168,9 @@ static bool ReplaceClassSpec(OldList specs, Specifier spec, bool param) } if(_class && _class.dataTypeString && !strcmp(_class.dataTypeString, "char *")) - return true; //false; + return 1; //false; if(!_class || _class.type == normalClass || _class.type == noHeadClass) - return true; + return 1; else if(param && _class.type == structClass) return 2; } @@ -180,10 +180,10 @@ static bool ReplaceClassSpec(OldList specs, Specifier spec, bool param) if(spec.specifier == ANY_OBJECT) { spec.specifier = VOID; - return true; + return 1; } } - return false; + return 0; } static void ReplaceByInstancePtr(Specifier spec, Declarator * declPtr, int type)