[Vm-dev] Fwd: Misc primitives & read-only objects
bera.clement at gmail.com
Wed Feb 21 12:01:20 UTC 2018
I'm trying to set literals as read-only in Pharo. I've got this problem
with this Misc primitive:
translate: aString from: start to: stop table: table
"translate the characters in the string by the given table, in place"
<primitive: 'primitiveTranslateStringWithTable' module:
<var: #table declareC: 'unsigned char *table'>
<var: #aString declareC: 'unsigned char *aString'>
start to: stop do: [ :i |
aString at: i put: (table at: (aString basicAt: i) + 1) ]
The primitive mutates aString without checking if it's read-only.
What is the right way in Smart syntax plugin to add the read-only check ?
Bâtiment B 40, avenue Halley 59650 *Villeneuve d'Ascq*
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the Vm-dev