[pypy-svn] pypy default: These callbacks return void, no need to return 0

amauryfa commits-noreply at bitbucket.org
Wed Feb 9 15:54:10 CET 2011


Author: Amaury Forgeot d'Arc <amauryfa at gmail.com>
Branch: 
Changeset: r41737:ef02e56e1e32
Date: 2011-02-09 15:52 +0100
http://bitbucket.org/pypy/pypy/changeset/ef02e56e1e32/

Log:	These callbacks return void, no need to return 0

diff --git a/lib_pypy/_sqlite3.py b/lib_pypy/_sqlite3.py
--- a/lib_pypy/_sqlite3.py
+++ b/lib_pypy/_sqlite3.py
@@ -456,7 +456,6 @@
         except KeyError:            
             def closure(context, nargs, c_params):
                 function_callback(callback, context, nargs, c_params)
-                return 0
             c_closure = FUNC(closure)
             self.func_cache[callback] = c_closure, closure
         ret = sqlite.sqlite3_create_function(self.db, name, num_args,
@@ -502,7 +501,6 @@
                     msg = ("user-defined aggregate's 'step' "
                            "method raised error")
                     sqlite.sqlite3_result_error(context, msg, len(msg))
-                return 0
 
             def final_callback(context):
 
@@ -523,7 +521,6 @@
                         _convert_result(context, val)
                     finally:
                         del self.aggregate_instances[aggregate_ptr[0]]
-                return 0
 
             c_step_callback = STEP(step_callback)
             c_final_callback = FINAL(final_callback)


More information about the Pypy-commit mailing list