瀏覽代碼

core: allow int parameters to module functions

- sync with master branch
- int param are converted automatically to str, therefore backward
  compatibility is ensured and module functions still get only str
  parameters
Daniel-Constantin Mierla 15 年之前
父節點
當前提交
a84cfc60a2
共有 1 個文件被更改,包括 0 次插入4 次删除
  1. 0 4
      cfg.y

+ 0 - 4
cfg.y

@@ -3204,7 +3204,6 @@ func_params:
 	;
 func_param:
     intno {
-#if 0
 		if (mod_func_action->val[1].u.number < MAX_ACTIONS-2) {
 			mod_func_action->val[mod_func_action->val[1].u.number+2].type =
 				NUMBER_ST;
@@ -3214,9 +3213,6 @@ func_param:
 		} else {
 			yyerror("Too many arguments\n");
 		}
-#else
-		yyerror("Function parameter with integer value not allowed\n");
-#endif
 	}
 	| STRING {
 		if (mod_func_action->val[1].u.number < MAX_ACTIONS-2) {