Macros are currently not supported in .api files.

> define MAX_NUM   (12)

The "define" keyword defines API messages, not macros.

The C preprocessor is one possibility to add support for macros,
but not sure whether it would play well with .api syntax.

You can try to add that (or a similar feature) by yourself,
mainly to this [0] directory.

Vratko.

[0] https://github.com/FDio/vpp/tree/master/src/tools/vppapigen

From: vpp-dev@lists.fd.io <vpp-dev@lists.fd.io> On Behalf Of wei_sky2...@163.com
Sent: Tuesday, September 24, 2019 1:14 PM
To: vpp-dev@lists.fd.io
Subject: [vpp-dev] VAT can support define a macro? #vapi


[Edited Message Follows]
in api file
I want to define a macro such as
define MAX_NUM   (12)

define my_structure
{
   u32 a;
   u8[MAX_NUM];
}
"define MAX_NUM   (12)" is can't be recognized,how can i do to define this?
Thanks
-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.

View/Reply Online (#14047): https://lists.fd.io/g/vpp-dev/message/14047
Mute This Topic: https://lists.fd.io/mt/34274817/21656
Mute #vapi: https://lists.fd.io/mk?hashtag=vapi&subid=1480452
Group Owner: vpp-dev+ow...@lists.fd.io
Unsubscribe: https://lists.fd.io/g/vpp-dev/unsub  [arch...@mail-archive.com]
-=-=-=-=-=-=-=-=-=-=-=-
  • ... wei_sky2008
    • ... wei_sky2008
      • ... Vratko Polak -X (vrpolak - PANTHEON TECHNOLOGIES at Cisco) via Lists.Fd.Io

Reply via email to