Inject just the relevant part of changes.swg in generated code

Don't include the entire file, including its header comment, into the
generated code, but just the part that we want to appear there.

This looks nicer and is also more explicit and hence clear.
This commit is contained in:
Vadim Zeitlin 2021-10-15 23:16:42 +02:00
commit e41234c5bc
2 changed files with 4 additions and 1 deletions

View file

@ -5,8 +5,9 @@
* c.swg
* ----------------------------------------------------------------------------- */
%include <cheader.swg>
%insert("runtime") "clabels.swg"
%insert("cheader") "cheader.swg"
%insert("runtime") %{
#include <stdlib.h>

View file

@ -2,6 +2,7 @@
* cheader.swg
* ----------------------------------------------------------------------------- */
%insert("cheader") %{
#ifndef SWIGIMPORT
# ifndef __GNUC__
# define __DLL_IMPORT __declspec(dllimport)
@ -16,3 +17,4 @@
#endif
#include <stddef.h>
%}