Startup renamed to __startup: it is internal function and mj already
uses word startup in other context.
This commit is contained in:
parent
6fd766c17e
commit
94d9dfa47a
2 changed files with 9 additions and 2 deletions
|
@ -208,7 +208,7 @@ function_def:
|
||||||
FUNCTION SYM { DBG( "Begining of function %s\n", $2->name ); cf_push_scope($2); } function_params function_body {
|
FUNCTION SYM { DBG( "Begining of function %s\n", $2->name ); cf_push_scope($2); } function_params function_body {
|
||||||
extern struct f_inst *startup_func;
|
extern struct f_inst *startup_func;
|
||||||
cf_define_symbol($2, SYM_FUNCTION, $5);
|
cf_define_symbol($2, SYM_FUNCTION, $5);
|
||||||
if (!strcasecmp($2->name, "startup"))
|
if (!strcasecmp($2->name, "__startup"))
|
||||||
startup_func = $5;
|
startup_func = $5;
|
||||||
$2->aux = (int) $4;
|
$2->aux = (int) $4;
|
||||||
$2->aux2 = $5;
|
$2->aux2 = $5;
|
||||||
|
|
|
@ -46,6 +46,7 @@ clist l;
|
||||||
p2 = prepend( p2, 5 );
|
p2 = prepend( p2, 5 );
|
||||||
print "Should be false: ", p2 ~ p;
|
print "Should be false: ", p2 ~ p;
|
||||||
print "Should be true: ", p2 ~ / * 4 3 2 1 /, p2, / * 4 3 2 1 /;
|
print "Should be true: ", p2 ~ / * 4 3 2 1 /, p2, / * 4 3 2 1 /;
|
||||||
|
print "Should be true: ", p2 ~ / * 4 3 * 1 /, p2, / * 4 3 * 1 /;
|
||||||
print "5 = ", p2.len;
|
print "5 = ", p2.len;
|
||||||
|
|
||||||
l = - empty -;
|
l = - empty -;
|
||||||
|
@ -58,7 +59,13 @@ clist l;
|
||||||
print "Should be false: ", (2,3) ~ l;
|
print "Should be false: ", (2,3) ~ l;
|
||||||
}
|
}
|
||||||
|
|
||||||
function startup()
|
function bla()
|
||||||
|
{
|
||||||
|
print "fifteen called";
|
||||||
|
return 15;
|
||||||
|
}
|
||||||
|
|
||||||
|
function __startup()
|
||||||
int i;
|
int i;
|
||||||
prefix px;
|
prefix px;
|
||||||
ip p;
|
ip p;
|
||||||
|
|
Loading…
Reference in a new issue