pike.git/
lib/
master.pike.in
Branch:
Tag:
Non-build tags
All tags
No tags
2000-06-09
2000-06-09 21:46:37 by Martin Stjernholm <mast@lysator.liu.se>
8f23069ecc001e8ed9a5b17516c86271453e66ee (
26
lines) (+
25
/-
1
)
[
Show
|
Annotate
]
Branch:
7.9
Added runtime_warning(), used by the gc.
Rev: lib/master.pike.in:1.122
1:
/* -*- Pike -*- *
-
* $Id: master.pike.in,v 1.
121
2000/06/
04
18
:
23
:
10
kinkie
Exp $
+
* $Id: master.pike.in,v 1.
122
2000/06/
09
21
:
46
:
37
mast
Exp $
* * Master-file for Pike. *
1247:
} }
+
/*
+
* Called for every runtime warning. The first argument identifies
+
* where the warning comes from, the second identifies the specific
+
* message, and the rest depends on that. See code below for currently
+
* implemented warnings.
+
*/
+
void runtime_warning (string where, string what, mixed... args)
+
{
+
if (want_warnings)
+
switch (where + "." + what) {
+
case "gc.bad_cycle":
+
// args[0] is an array containing the objects in the cycle
+
// which aren't destructed and have destroy() functions.
+
werror ("GC warning: Garbing cycle where destroy() will be called "
+
"in arbitrary order:\n%{ %s\n%}",
+
map (args[0], describe_object));
+
break;
-
+
default:
+
werror ("%s warning: %s %O\n", capitalize (where), what, args);
+
}
+
}
+
+
static mixed _charset_mod; /* This function is called by cpp() when it wants to do * character code conversion.