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

Multiline constant description produces strange C header file. #1281

Closed
stephan57160 opened this issue Oct 12, 2021 · 3 comments
Closed

Multiline constant description produces strange C header file. #1281

stephan57160 opened this issue Oct 12, 2021 · 3 comments

Comments

@stephan57160
Copy link
Contributor

Extract of api/foo.api :

	<constant name = "cst1" value = "123" >
		Multi
		line 
		constant
		description.
	</constant>

Generated code in include/foo.h :

#define FOO_CST1 123                         // Multi
#define FOO_CST1 123                         // line
#define FOO_CST1 123                         // constant
#define FOO_CST1 123                         // description.

I still do not understand why my compiler does not complain, but some old ones may.

Would be better to generate like it is done for some other supported languages :

// Multi
// line
// constant
// description
#define FOO_CST1 123

I can probably send a PR soon, if anyone (except me) is insterested in.

@sphaero
Copy link
Contributor

sphaero commented Oct 25, 2021

I have not experienced something like this but I think you are correct. PR is welcomed.

@stephan57160
Copy link
Contributor Author

I'll send a PR later, today.

@stephan57160
Copy link
Contributor Author

Can be closed, after PR #1283, I suppose.
I maintenairs decide.

@bluca bluca closed this as completed Oct 30, 2021
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

3 participants