|Anonymous | Login||08-15-2020 20:26 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|
|Summary||0007238: SmartSyntaxPluginTMethod>>nullReturnExpr relies on #define null, may conflict with other libraries|
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:
Some value other than 'null' (e.g. 'sqNull') might prevent this problem.
From the vm-dev list (estebanlm at gmail.com):
I had to change null output for squeak generated plugins (it was
colliding with other libraries needed) and I found this:
^ 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:
^ TReturnNode new
setExpression: (TVariableNode new setName: 'nil')
just replaced "null" for "nil", and everything seems to be working
fine. Is this hack correct?
|There are no notes attached to this issue.|
|12-01-08 23:44||lewis||New Issue|
|12-01-08 23:44||lewis||Status||new => assigned|
|12-01-08 23:44||lewis||Assigned To||=> tim|
|12-01-08 23:46||lewis||Assigned To||tim => lewis|
|07-03-09 19:49||lewis||Issue Monitored: lewis|
| Mantis 1.0.8[^]
Copyright © 2000 - 2007 Mantis Group
33 total queries executed.|
27 unique queries executed.