Anonymous | Login | 02-28-2021 22:28 UTC |
Main | My View | View Issues | Change Log | Docs |
Viewing Issue Simple Details [ Jump to Notes ] | [ View Advanced ] [ Issue History ] [ Print ] | |||||||||||
ID | Category | Severity | Reproducibility | Date Submitted | Last Update | |||||||
0007238 | [Squeak] VM | minor | always | 12-01-08 23:44 | 12-01-08 23:46 | |||||||
Reporter | lewis | View Status | public | |||||||||
Assigned To | lewis | |||||||||||
Priority | low | Resolution | open | |||||||||
Status | assigned | Product Version | ||||||||||
Summary | 0007238: SmartSyntaxPluginTMethod>>nullReturnExpr relies on #define null, may conflict with other libraries | |||||||||||
Description |
In Cross/vm/sq.h we have: #define null 0 /* using "null" because nil is predefined in Think C */ This is used as a return value in #nullReturnExpr, and presumably elsewhere. However, this definition has been reported to conflict with other code bases, as reported by: http://lists.squeakfoundation.org/pipermail/vm-dev/2008-October/002053.html [^] Some value other than 'null' (e.g. 'sqNull') might prevent this problem. |
|||||||||||
Additional Information |
From the vm-dev list (estebanlm at gmail.com): Hi, I had to change null output for squeak generated plugins (it was colliding with other libraries needed) and I found this: SmartSyntaxPluginTMethod>>nullReturnExpr ^ TReturnNode new setExpression: (TVariableNode new setName: 'null') this generates correct return lines, but just because "null" is defined previously. If I change null to, e.g. sqNil, the previous method still generates "return null" lines. So I changed the method as follows: SmartSyntaxPluginTMethod>>nullReturnExpr ^ TReturnNode new setExpression: (TVariableNode new setName: 'nil') just replaced "null" for "nil", and everything seems to be working fine. Is this hack correct? Cheers, Esteban |
|||||||||||
Attached Files | ||||||||||||
|
There are no notes attached to this issue. |
Mantis 1.0.8[^]
Copyright © 2000 - 2007 Mantis Group
33 total queries executed. 27 unique queries executed. |