Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

typedef in idl why not generate xxx__free() #2061

Open
zydzcy opened this issue Aug 2, 2024 · 1 comment
Open

typedef in idl why not generate xxx__free() #2061

zydzcy opened this issue Aug 2, 2024 · 1 comment

Comments

@zydzcy
Copy link

zydzcy commented Aug 2, 2024

typedef in idl why not generate HelloWorldData_Msg_test__free()

module HelloWorldData
{
  struct Msg
  {
    @key
    long userID;
    string message;
  };

  typedef Msg Msg_test;
};

to

typedef struct HelloWorldData_Msg
{
  int32_t userID;
  char * message;
} HelloWorldData_Msg;

extern const dds_xml_topic_info_t HelloWorldData_Msg_arraylist[];
extern const dds_topic_descriptor_t HelloWorldData_Msg_desc;

#define HelloWorldData_Msg__alloc() \
((HelloWorldData_Msg*) dds_alloc (sizeof (HelloWorldData_Msg)));

#define HelloWorldData_Msg_free(d,o) \
dds_sample_free ((d), &HelloWorldData_Msg_desc, (o))

typedef HelloWorldData_Msg HelloWorldData_Msg_test;

#define HelloWorldData_Msg_test__alloc() \
((HelloWorldData_Msg_test*) dds_alloc (sizeof (HelloWorldData_Msg_test)));
@eboasson
Copy link
Contributor

Good question, it does make sense that it should be generated ...

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants