[Commit] nickle ChangeLog,1.124,1.125 builtin.c,1.23,1.24

Keith Packard commit at keithp.com
Tue Mar 15 11:47:16 PST 2005


Committed by: keithp

Update of /local/src/CVS/nickle
In directory home.keithp.com:/tmp/cvs-serv11372

Modified Files:
	ChangeLog builtin.c 
Log Message:
2005-03-15  Keith Packard  <keithp at keithp.com>
version 2.47

	* debian/changelog:
	Update for version 2.47
	* builtin.c: (BuiltinType), (BuiltinArgType), (BuiltinAddFunction):
	Builtin functions return pointers, not references as reference
	return values now auto-dereference


Index: ChangeLog
===================================================================
RCS file: /local/src/CVS/nickle/ChangeLog,v
retrieving revision 1.124
retrieving revision 1.125
diff -u -d -r1.124 -r1.125
--- ChangeLog	15 Mar 2005 19:23:48 -0000	1.124
+++ ChangeLog	15 Mar 2005 19:47:12 -0000	1.125
@@ -1,4 +1,13 @@
 2005-03-15  Keith Packard  <keithp at keithp.com>
+version 2.47
+
+	* debian/changelog:
+	Update for version 2.47
+	* builtin.c: (BuiltinType), (BuiltinArgType), (BuiltinAddFunction):
+	Builtin functions return pointers, not references as reference
+	return values now auto-dereference
+
+2005-03-15  Keith Packard  <keithp at keithp.com>
 
 	* hash.c: (HashGet):
 	Check for NULL hash value in a valid hash element.  This

Index: builtin.c
===================================================================
RCS file: /local/src/CVS/nickle/builtin.c,v
retrieving revision 1.23
retrieving revision 1.24
diff -u -d -r1.23 -r1.24
--- builtin.c	17 Dec 2004 02:05:20 -0000	1.23
+++ builtin.c	15 Mar 2005 19:47:12 -0000	1.24
@@ -129,7 +129,7 @@
 }
 
 static char *
-BuiltinType (char *format, Type **type)
+BuiltinType (char *format, Type **type, Bool arg)
 {
     Type   *t;
     Bool    ref = False;
@@ -162,7 +162,7 @@
     if (*format == 'H')
     {
 	hash = True;
-	format = BuiltinType (format + 1, &k);
+	format = BuiltinType (format + 1, &k, True);
     }
     switch (f = *format++) {
     case 'p': t = typePoly; break;
@@ -193,7 +193,7 @@
 	break;
     }
     if (ref)
-	t = NewTypeRef (t, False);
+	t = NewTypeRef (t, arg ? False : True);
     if (array)
 	t = NewTypeArray (t, dims, resizable);
     if (hash)
@@ -222,7 +222,7 @@
 	    varargs = True;
 	    format++;
 	}
-	format = BuiltinType (format, &t);
+	format = BuiltinType (format, &t, True);
 	if (!varargs)
 	    argc++;
         a = NewArgType (t, varargs, 0, 0, 0);
@@ -291,7 +291,7 @@
     Type	*ret;
 
     args = BuiltinArgType (format, &argc);
-    BuiltinType (ret_format, &ret);
+    BuiltinType (ret_format, &ret, False);
     sym = BuiltinSymbol (namespacep, name, NewTypeFunc (ret, args));
     func =  NewFunc (NewBuiltinCode (ret, args, argc, f, jumping, doc), 0);
     BoxValueSet (sym->global.value, 0, func);




More information about the Commit mailing list