-fakeversion appears in generated files. Made comment with version number at top of generated files consistent.

git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk/SWIG@9563 626c5289-ae23-0410-ae9c-e8d60b6d4f22
This commit is contained in:
William S Fulton 2006-11-15 23:45:47 +00:00
commit 97b1fbaa02
10 changed files with 50 additions and 34 deletions

View file

@ -15,6 +15,7 @@ char cvsroot_misc_c[] = "$Header$";
#include <ctype.h>
#include <limits.h>
static char *fake_version = 0;
/* -----------------------------------------------------------------------------
* Swig_copy_string()
@ -31,6 +32,26 @@ char *Swig_copy_string(const char *s) {
return c;
}
/* -----------------------------------------------------------------------------
* Swig_set_fakeversion()
*
* Version string override
* ----------------------------------------------------------------------------- */
void Swig_set_fakeversion(const char *version) {
fake_version = Swig_copy_string(version);
}
/* -----------------------------------------------------------------------------
* Swig_package_version()
*
* Return the package string containing the version number
* ----------------------------------------------------------------------------- */
const char *Swig_package_version(void) {
return fake_version ? fake_version : PACKAGE_VERSION;
}
/* -----------------------------------------------------------------------------
* Swig_banner()
*
@ -45,7 +66,7 @@ void Swig_banner(File *f) {
* This file is not intended to be easily readable and contains a number of \n\
* coding conventions designed to improve portability and efficiency. Do not make\n\
* changes to this file unless you know what you are doing--modify the SWIG \n\
* interface file instead. \n", PACKAGE_VERSION);
* interface file instead. \n", Swig_package_version());
/* String too long for ISO compliance */
Printf(f, " * ----------------------------------------------------------------------------- */\n\n");

View file

@ -441,6 +441,8 @@ extern "C" {
/* --- Misc --- */
extern char *Swig_copy_string(const char *c);
extern void Swig_set_fakeversion(const char *version);
extern const char *Swig_package_version(void);
extern void Swig_banner(File *f);
extern String *Swig_string_escape(String *s);
extern String *Swig_string_mangle(const String *s);