/tags/Root-branch-php-utl/SWIG/Source/Swig/warn.c
C | 40 lines | 16 code | 10 blank | 14 comment | 2 complexity | 192fd7cb569ae90910398b9a4afa7b29 MD5 | raw file
Possible License(s): LGPL-2.1, Cube, GPL-3.0, 0BSD, GPL-2.0
- /* -----------------------------------------------------------------------------
- * See the LICENSE file for information on copyright, usage and redistribution
- * of SWIG, and the README file for authors - http://www.swig.org/release.html.
- *
- * warn.c
- *
- * SWIG warning framework. This was added to warn developers about
- * deprecated APIs and other features.
- * ----------------------------------------------------------------------------- */
- 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);
- }
-
-