Sean1708 / rusty-cheddar

A Rust crate for automatically generating C header files from Rust source file.
http://sean1708.github.io/rusty-cheddar/
191 stars 25 forks source link

Header ifdef guard should filter out illegal characters #29

Closed jgallagher closed 8 years ago

jgallagher commented 8 years ago

The ifdef guard is currently defined as

"#ifndef cheddar_generated_{0}_h"

(likewise for the next line) where {0} is filled in with the header filename. For typical header filenames, this creates preprocessor tokens that look like cheddar_generated_filename.h_h, but . is not a legal preprocessor identifier character (clang under OS X gives a warning about "extra tokens following an identifier", pointing to the .).

Sean1708 commented 8 years ago

Thanks for letting me know, that should be fixed now and I've done a v0.3.1 release for you. Could you check that it has worked then close this issue if it has please.

jgallagher commented 8 years ago

Yep, thanks!