mirror of
https://github.com/google/blockly.git
synced 2026-01-07 17:10:11 +01:00
Prevent collisions between user functions and helper functions.
This commit is contained in:
@@ -72,7 +72,8 @@ Blockly.Python['procedures_defreturn'] = function(block) {
|
||||
var code = 'def ' + funcName + '(' + args.join(', ') + '):\n' +
|
||||
globals + branch + returnValue;
|
||||
code = Blockly.Python.scrub_(block, code);
|
||||
Blockly.Python.definitions_[funcName] = code;
|
||||
// Add % so as not to collide with helper functions in definitions list.
|
||||
Blockly.Python.definitions_['%' + funcName] = code;
|
||||
return null;
|
||||
};
|
||||
|
||||
|
||||
Reference in New Issue
Block a user