-
Notifications
You must be signed in to change notification settings - Fork 22
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
refactor more cpp #122
base: master
Are you sure you want to change the base?
refactor more cpp #122
Conversation
target_link_libraries(cose_dumper PRIVATE cn-cbor::cn-cbor cose-c::cose-c) | ||
if(MSVC) | ||
target_link_libraries(cose_dumper PRIVATE ws2_32) | ||
endif() | ||
|
||
target_include_directories(cose_dumper PRIVATE ../src) | ||
target_compile_options(cose_dumper PRIVATE "-fpermissive") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
as we are using cpp, we can overload functions -> we should get rid if macros that insert , context
to the argument list IMHO
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It is not going to be possible to remove all of these macros as the CBOR library is still in C. I am also not too sure how much one can rely on linkers to not require functions exist, I know that one can compile each function into a separate block for MSVC but I don't know for sure that this exists in gcc and clang as they are not the compilers that I use much
@@ -28,7 +28,7 @@ typedef struct _cose_mac* HCOSE_MAC; | |||
typedef struct _cose_mac0* HCOSE_MAC0; | |||
typedef struct _cose_counterSignature* HCOSE_COUNTERSIGN; | |||
typedef struct _cose_counterSignature1* HCOSE_COUNTERSIGN1; | |||
typedef struct _cose_key* HCOSE_KEY; | |||
typedef class COSE_KEY* HCOSE_KEY; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
My C compiler is going to produce an error over the word class in this file.
see commits for detailed infos