Bug 10376 - HEADER START/HEADER END to insert C code into the generated .h file
HEADER START/HEADER END to insert C code into the generated .h file
Product: PIDL
Classification: Unclassified
Component: wireshark
All All
: P5 enhancement
: ---
Assigned To: Jelmer Vernooij
Jelmer Vernooij
Depends on:
  Show dependency treegraph
Reported: 2014-01-13 21:11 UTC by Guy Harris
Modified: 2016-07-27 22:22 UTC (History)
1 user (show)

See Also:

Patch to add HEADER START/HEADER END (3.02 KB, patch)
2014-01-13 21:11 UTC, Guy Harris
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description Guy Harris 2014-01-13 21:11:21 UTC
Created attachment 9589 [details]

In the LSA dissector, we currently have some functions defined in the .cnf file that aren't replacement dissectors for types, they're helper functions.  We want to put the declarations of those functions into the generated .h file, so that the declarations and definitions will be checked against each other when the dissector is compiled, and so that other code importing the functions don't have to declare them.

Here's a patch to add HEADER START and HEADER END directives, with declarations to be inserted into the header file between them.

It also adds some checks for nesting of CODE and HEADER sections, and improves the "this is a generated file, don't edit it" comment at the beginning of the .c and .h files.

(Actually, we *do* need to edit the files, due to other Pidl bugs; I think I've filed at least some of them.)
Comment 1 Guy Harris 2016-07-27 22:22:37 UTC
This was fixed in 372b41eede4cfcedcea7fbe8370dd7ac2d015db2.