[sr-dev] git:master:a84e96f2: core: added preprocessor directive #!ifexp stm

Daniel-Constantin Mierla miconda at gmail.com
Wed Sep 14 08:25:05 CEST 2022


Module: kamailio
Branch: master
Commit: a84e96f2e025a6befd4721ad3f67a104fd594190
URL: https://github.com/kamailio/kamailio/commit/a84e96f2e025a6befd4721ad3f67a104fd594190

Author: Daniel-Constantin Mierla <miconda at gmail.com>
Committer: Daniel-Constantin Mierla <miconda at gmail.com>
Date: 2022-09-14T08:17:30+02:00

core: added preprocessor directive #!ifexp stm

- conditional evaluation of the statement as an expression with strings
  and numbers
- example:

 #!ifexp KAMAILIO_VERSION >= 5006000
 ...
 #!else
 ...
 #!endif

- defined IDs can be used inside the expression
  - if not defined, value 0 is used
  - if defined with value, the value is used
  - if defined with no value, value 1 is used
- if expression is evaluated to !=0 or non-empty string, then it is considered true

---

Modified: src/core/cfg.lex
Modified: src/core/ppcfg.c
Modified: src/core/ppcfg.h

---

Diff:  https://github.com/kamailio/kamailio/commit/a84e96f2e025a6befd4721ad3f67a104fd594190.diff
Patch: https://github.com/kamailio/kamailio/commit/a84e96f2e025a6befd4721ad3f67a104fd594190.patch




More information about the sr-dev mailing list