From c66181df6174ec0fe12727a20d343eb908cbad0c Mon Sep 17 00:00:00 2001 From: murf Date: Thu, 5 Jul 2007 18:15:22 +0000 Subject: In regards to changes for 9508, expr2 system choking on floating point numbers, I'm adding this update to round out (no pun intended) and make this FP-capable version of the Expr2 stuff interoperate better with previous integer-only usage, by providing Functions syntax, with 20 builtin functions for floating pt to integer conversions, and some general floating point math routines that might commonly be used also. Along with this, I made it so if a function was not a builtin, it will try and find it in the ast_custom_function list, and if found, execute it and collect the results. Thus, you can call system functions like CDR(), CHANNEL(), etc, from within $\[..\] exprs, without having to wrap them in $\{...\} (curly brace) notation. Did a valgrind on the standalone and made sure there's no mem leaks. Looks good. Updated the docs, too. git-svn-id: http://svn.digium.com/svn/asterisk/trunk@73449 f38db490-d61c-443f-a65b-d21fe96a405b --- include/asterisk/ast_expr.h | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'include/asterisk/ast_expr.h') diff --git a/include/asterisk/ast_expr.h b/include/asterisk/ast_expr.h index bc0331309..6ca201f42 100644 --- a/include/asterisk/ast_expr.h +++ b/include/asterisk/ast_expr.h @@ -18,12 +18,14 @@ #ifndef _ASTERISK_EXPR_H #define _ASTERISK_EXPR_H - +#ifndef STANDALONE +#include "asterisk/channel.h" +#endif #if defined(__cplusplus) || defined(c_plusplus) extern "C" { #endif -int ast_expr(char *expr, char *buf, int length); +int ast_expr(char *expr, char *buf, int length, struct ast_channel *chan); #if defined(__cplusplus) || defined(c_plusplus) } -- cgit v1.2.3