Skip to content

Commit

Permalink
Merge pull request #654 from embedcat/feat/fix-arguments-c-api
Browse files Browse the repository at this point in the history
[modem]: Fix arguments names when spawn esp_modem_xxx declarations
  • Loading branch information
david-cermak authored Sep 18, 2024
2 parents 6705bca + b6792c5 commit e926a2c
Showing 1 changed file with 2 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,9 @@
// Parameters
// * handle different parameters for C++ and C API
// * make parameter unique names, so they could be easily referenced and forwarded
#define _ARG(param, name) param
#define INT_IN(param, name) int _ARG(param, name)
#ifdef __cplusplus
#define _ARG(param, name) param
#include <string>
#define STRING_IN(param, name) const std::string& _ARG(param, name)
#define STRING_OUT(param, name) std::string& _ARG(param, name)
Expand All @@ -16,6 +16,7 @@

#define STRUCT_OUT(struct_name, p1) struct_name& p1
#else
#define _ARG(param, name) name
#define STRING_IN(param, name) const char* _ARG(param, name)
#define STRING_OUT(param, name) char* _ARG(param, name)
#define BOOL_IN(param, name) const bool _ARG(param, name)
Expand Down

0 comments on commit e926a2c

Please sign in to comment.