1
0
mirror of https://github.com/samba-team/samba.git synced 2025-03-08 04:58:40 +03:00

r8562: small merge with upstream

(This used to be commit 6c9bf162afddda4747ef08b56598aaf0747a4d27)
This commit is contained in:
Andrew Tridgell 2005-07-19 00:40:52 +00:00 committed by Gerald (Jerry) Carter
parent f1245d4ac1
commit 2d92eca393
2 changed files with 5 additions and 12 deletions

View File

@ -1280,6 +1280,10 @@ static int parseId(Ejs *ep, int state, int flags, char **id, char **fullName,
tid = ejsLexGetToken(ep, state);
if (tid == EJS_TOK_LPAREN) {
if (ep->currentProperty == 0 && (flags & EJS_FLAGS_EXE)) {
ejsError(ep, "Function name not defined \"%s\"\n", *id);
return -1;
}
ejsLexPutbackToken(ep, EJS_TOK_FUNCTION_NAME, ep->token);
return state;
}
@ -1975,11 +1979,6 @@ static int evalFunction(Ejs *ep, MprVar *obj, int flags)
actualArgs = proc->args;
argValues = (MprVar**) actualArgs->handles;
if (prototype == NULL) {
ejsError(ep, "Function name not defined '%s'\n", proc->procName);
return -1;
}
/*
* Create a new variable stack frame. ie. new local variables.
*/
@ -2179,7 +2178,6 @@ int ejsRunFunction(int eid, MprVar *obj, const char *functionName,
MprVar *ejsFindObj(Ejs *ep, int state, const char *property, int flags)
{
MprVar *vp;
MprVar *obj;
mprAssert(ep);
@ -2193,10 +2191,7 @@ MprVar *ejsFindObj(Ejs *ep, int state, const char *property, int flags)
} else {
/* First look local, then look global */
vp = mprGetProperty(ep->local, property, 0);
if (vp) {
obj = ep->local;
} else if (mprGetProperty(ep->local, property, 0)) {
if (mprGetProperty(ep->local, property, 0)) {
obj = ep->local;
} else {
obj = ep->global;

View File

@ -43,8 +43,6 @@
/*********************************** Defines **********************************/
#define ESP_STRING_ARGS MPR_TYPE_STRING_ARGS
#if BLD_FEATURE_SQUEEZE
#define ESP_TOK_INCR 1024
#define ESP_MAX_HEADER 1024