aboutsummaryrefslogtreecommitdiff
path: root/test/gen_h.zig
AgeCommit message (Collapse)Author
2023-06-19all: zig fmt and rename "@XToY" to "@YFromX"Eric Joldasov
Signed-off-by: Eric Joldasov <bratishkaerik@getgoogleoff.me>
2020-10-31run zig fmt on src/ and test/Vexu
2020-10-06Update zig files for opaque type syntaxTadeo Kondrak
2020-04-28@OpaqueType -> @Type(.Opaque)Tadeo Kondrak
2019-12-09remove var args from the languageAndrew Kelley
closes #208
2019-11-24export: check variable typeSahnvour
also fixed existing occurrences
2019-11-24refactored gen_h_file to improve maintainability and outputSahnvour
- extracted functions - factorised extern "C" into a block containing all function prototypes instead of writing macros all over the place - using intermediate buffers instead of writing directly to the output file
2019-05-25gen-h: do not output visibility macros when the build is staticSahnvour
2018-11-13New Zig formal grammar (#1685)Jimmi Holst Christensen
Reverted #1628 and changed the grammar+parser of the language to not allow certain expr where types are expected
2018-10-15Solve the return type ambiguity (#1628)Jimmi Holst Christensen
Changed container and initializer syntax * <container> { ... } -> <container> . { ... } * <exrp> { ... } -> <expr> . { ...}
2018-09-06add C ABI testsAndrew Kelley
2018-07-18Allow pointers to anything in extern/exported declarations (#1258)Jimmi Holst Christensen
* type_allowed_in_extern accepts all ptr not size 0 * Generate correct headers for none extern structs/unions/enums
2018-06-01fix regressionsAndrew Kelley
2018-05-31use * for pointer type instead of &Andrew Kelley
See #770 To help automatically translate code, see the zig-fmt-pointer-reform-2 branch. This will convert all & into *. Due to the syntax ambiguity (which is why we are making this change), even address-of & will turn into *, so you'll have to manually fix thes instances. You will be guaranteed to get compile errors for them - expected 'type', found 'foo'
2018-05-29run zig fmt on the codebaseAndrew Kelley
See #1003
2018-03-23Fix OpqaueType usage in exported c functionsMarc Tiehuis
We prefer `struct typename`. If a typedef is required, this must be done manually after generation.
2018-01-25syntax: functions require return type. remove `->`Andrew Kelley
The purpose of this is: * Only one way to do things * Changing a function with void return type to return a possible error becomes a 1 character change, subtly encouraging people to use errors. See #632 Here are some imperfect sed commands for performing this update: remove arrow: ``` sed -i 's/\(\bfn\b.*\)-> /\1/g' $(find . -name "*.zig") ``` add void: ``` sed -i 's/\(\bfn\b.*\))\s*{/\1) void {/g' $(find ../ -name "*.zig") ``` Some cleanup may be necessary, but this should do the bulk of the work.
2018-01-23Add array type handling for gen_hMarc Tiehuis
2018-01-22add new kind of test: generating .h files. and moreAndrew Kelley
* docgen supports obj_err code kind for demonstrating errors without explicit test cases * add documentation for `extern enum`. See #367 * remove coldcc keyword and add @setIsCold. See #661 * add compile errors for non-extern struct, enum, unions in function signatures * add .h file generation for extern struct, enum, unions