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

Problem with sc_string type in C-Generator #121

Closed
dalai4git opened this issue Jul 30, 2015 · 1 comment

Comments

@dalai4git
Copy link

commented Jul 30, 2015

Functions that take sc_string have in the generated code signatures with const sc_string.

This would have been ok, but unfortunately sc_string is defined in sc_types.h by:

typedef char * sc_string; 

This means that the function argument is in reality char *const (a const pointer to char) and not const char * (a pointer to const char) as one would expect.

A workaround is to define the sc_string with #define sc_string char*.

@muehlbrandt

This comment has been minimized.

Copy link
Contributor

commented Aug 7, 2015

An alternative possibility would be to directly generate the char * into the code, but for compatibility reasons i also prefer the #define sc_string char* solution.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
4 participants
You can’t perform that action at this time.