Courtesy of Thomas Brodt, here's a fix for the problem I ran into few months
back (see bottom of the email). We ended up ignoring it at the time, but
Thomas sent me a hint and I had a chance to confirm it today. In
CExpressionParser>>exprVariable:,
((defn isKindOf: CMacroDefinition) and: [defn name == varName asSymbol])
ifTrue: [0]
ifFalse: [defn value]]
becomes
((defn isKindOf: CMacroDefinition) and: [defn name == varName asSymbol])
ifTrue: [defn value]
ifFalse: [0]]
Looks like a simple oversight to me, unless there's something I don't
understand about this. With the fix a list of defines returning 0s in our
interface class went from 18 down to 0. We still have some that return nils,
but I already sent out another report earlier today about these.
Cheers!
-Boris
--
+1.604.689.0322
DeepCove Labs Ltd.
4th floor 595 Howe Street
Vancouver, Canada V6C 2T5
[hidden email]
CONFIDENTIALITY NOTICE
This email is intended only for the persons named in the message
header. Unless otherwise indicated, it contains information that is
private and confidential. If you have received it in error, please
notify the sender and delete the entire message including any
attachments.
Thank you.
> -----Original Message-----
> From: Boris Popov [mailto:
[hidden email]]
> Sent: Wednesday, November 30, 2005 4:38 PM
> To: Vwnc
> Subject: [DLLCC] Wrong return value for defines?
>
> For some reason if #define method references another #define
> instead of a value, it returns a 0 instead of a proper value
> of a #define it references.
>
> Say, we have
>
> TBPARAM_PRINT_FILE
> <C: #define TBPARAM_PRINT_FILE CFG_IJPRINTER_PRINTBMP>
>
> CFG_IJPRINTER_PRINTBMP
> <C: #define CFG_IJPRINTER_PRINTBMP 33>
>
> One would expect that both of them return 33, but thats not
> quite the case, because only CFG_IJPRINTER_PRINTBMP returns
> 33, TBPARAM_PRINT_FILE returns 0.
>
> Any ideas?
>
> -Boris
>
> --
> +1.604.689.0322
> DeepCove Labs Ltd.
> 4th floor 595 Howe Street
> Vancouver, Canada V6C 2T5
>
>
[hidden email]
>
> CONFIDENTIALITY NOTICE
>
> This email is intended only for the persons named in the
> message header. Unless otherwise indicated, it contains
> information that is private and confidential. If you have
> received it in error, please notify the sender and delete the
> entire message including any attachments.
>
> Thank you.
>