The great merge
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk@4141 626c5289-ae23-0410-ae9c-e8d60b6d4f22
This commit is contained in:
parent
6fcc22a1f8
commit
516036631c
1508 changed files with 125983 additions and 44037 deletions
42
SWIG/Source/Swig/warn.c
Normal file
42
SWIG/Source/Swig/warn.c
Normal file
|
|
@ -0,0 +1,42 @@
|
|||
/* -----------------------------------------------------------------------------
|
||||
* warn.c
|
||||
*
|
||||
* SWIG warning framework. This was added to warn developers about
|
||||
* deprecated APIs and other features.
|
||||
*
|
||||
* Author(s) : David Beazley (beazley@cs.uchicago.edu)
|
||||
*
|
||||
* Copyright (C) 1999-2001. The University of Chicago
|
||||
* See the file LICENSE for information on usage and redistribution.
|
||||
* ----------------------------------------------------------------------------- */
|
||||
|
||||
char cvsroot_warn_c[] = "$Header$";
|
||||
|
||||
#include "swig.h"
|
||||
|
||||
static Hash *warnings = 0;
|
||||
|
||||
/* -----------------------------------------------------------------------------
|
||||
* Swig_warn()
|
||||
*
|
||||
* Issue a warning
|
||||
* ----------------------------------------------------------------------------- */
|
||||
|
||||
void
|
||||
Swig_warn(const char *filename, int line, const char *msg) {
|
||||
String *key;
|
||||
if (!warnings) {
|
||||
warnings = NewHash();
|
||||
}
|
||||
key = NewStringf("%s:%d", filename,line);
|
||||
if (!Getattr(warnings,key)) {
|
||||
Printf(stderr,"swig-dev warning:%s:%d:%s\n", filename, line, msg);
|
||||
Setattr(warnings,key,key);
|
||||
}
|
||||
Delete(key);
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
Loading…
Add table
Add a link
Reference in a new issue