svn commit: samba r8562 - in branches/SAMBA_4_0/source/lib/appweb: ejs esp

tridge at samba.org tridge at samba.org
Tue Jul 19 00:40:53 GMT 2005


Author: tridge
Date: 2005-07-19 00:40:52 +0000 (Tue, 19 Jul 2005)
New Revision: 8562

WebSVN: http://websvn.samba.org/cgi-bin/viewcvs.cgi?view=rev&root=samba&rev=8562

Log:
small merge with upstream

Modified:
   branches/SAMBA_4_0/source/lib/appweb/ejs/ejsParser.c
   branches/SAMBA_4_0/source/lib/appweb/esp/esp.h


Changeset:
Modified: branches/SAMBA_4_0/source/lib/appweb/ejs/ejsParser.c
===================================================================
--- branches/SAMBA_4_0/source/lib/appweb/ejs/ejsParser.c	2005-07-19 00:16:43 UTC (rev 8561)
+++ branches/SAMBA_4_0/source/lib/appweb/ejs/ejsParser.c	2005-07-19 00:40:52 UTC (rev 8562)
@@ -1280,6 +1280,10 @@
 
 	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 @@
 	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 @@
 
 MprVar *ejsFindObj(Ejs *ep, int state, const char *property, int flags)
 {
-	MprVar		*vp;
 	MprVar		*obj;
 
 	mprAssert(ep);
@@ -2193,11 +2191,8 @@
 
 	} else {
 		/* First look local, then look global */
-		vp = mprGetProperty(ep->local, property, 0);
-		if (vp) {
+		if (mprGetProperty(ep->local, property, 0)) {
 			obj = ep->local;
-		} else if (mprGetProperty(ep->local, property, 0)) {
-			obj = ep->local;
 		} else {
 			obj = ep->global;
 		}

Modified: branches/SAMBA_4_0/source/lib/appweb/esp/esp.h
===================================================================
--- branches/SAMBA_4_0/source/lib/appweb/esp/esp.h	2005-07-19 00:16:43 UTC (rev 8561)
+++ branches/SAMBA_4_0/source/lib/appweb/esp/esp.h	2005-07-19 00:40:52 UTC (rev 8562)
@@ -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



More information about the samba-cvs mailing list