[Zope3-checkins] CVS: Zope3/src/zodb/code - function.py:1.4

Jeremy Hylton jeremy@zope.com
Tue, 31 Dec 2002 13:06:24 -0500


Update of /cvs-repository/Zope3/src/zodb/code
In directory cvs.zope.org:/tmp/cvs-serv32687

Modified Files:
	function.py 
Log Message:
Fix call to new.function().

The argdefs are the fourth argument, not the third.  If there are no
argdefs, you can't pass None.


=== Zope3/src/zodb/code/function.py 1.3 => 1.4 ===
--- Zope3/src/zodb/code/function.py:1.3	Mon Dec 30 19:15:29 2002
+++ Zope3/src/zodb/code/function.py	Tue Dec 31 13:06:23 2002
@@ -178,7 +178,10 @@
             code = cowrap.ascode()
 
         func_defaults, func_dict = func
-        func = new.function(code, mod.__dict__, func_defaults)
+        if func_defaults:
+            func = new.function(code, mod.__dict__, None, func_defaults)
+        else:
+            func = new.function(code, mod.__dict__)
         if func_dict:
             func.func_dict.update(func_dict)
         self._pf_func = func