changeset 96:73e2dc29ce8d

FIX: Rename the `pypy_plugin' variable to `pypy3_plugin` because the compiler creates it that way
author Franz Glasner <fzglas.hg@dom66.de>
date Wed, 17 Jun 2020 22:35:10 +0200
parents 4fb07ef1f4b4
children dd6c2bbd067b
files uwsginl-plugin-lang-pypy3/files/extra/patch-plugins_pypy_pypy__setup.py
diffstat 1 files changed, 37 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/uwsginl-plugin-lang-pypy3/files/extra/patch-plugins_pypy_pypy__setup.py	Wed Jun 17 22:04:54 2020 +0200
+++ b/uwsginl-plugin-lang-pypy3/files/extra/patch-plugins_pypy_pypy__setup.py	Wed Jun 17 22:35:10 2020 +0200
@@ -1,5 +1,5 @@
 --- plugins/pypy/pypy_setup.py.orig	2020-06-14 11:50:00.000000000 +0200
-+++ plugins/pypy/pypy_setup.py	2020-06-17 21:51:53.458217000 +0200
++++ plugins/pypy/pypy_setup.py	2020-06-17 22:05:41.175101000 +0200
 @@ -33,6 +33,12 @@
  extern void (*uwsgi_pypy_post_fork_hook)(void);
  '''
@@ -38,6 +38,24 @@
  # uwsgi definitions
  cdefines = '''
  %s
+@@ -168,7 +180,7 @@
+ };
+ struct uwsgi_server uwsgi;
+ 
+-struct uwsgi_plugin pypy_plugin;
++struct uwsgi_plugin pypy3_plugin;
+ 
+ const char *uwsgi_pypy_version;
+ 
+@@ -269,7 +281,7 @@
+ %s
+ 
+ extern struct uwsgi_server uwsgi;
+-extern struct uwsgi_plugin pypy_plugin;
++extern struct uwsgi_plugin pypy3_plugin;
+ %s
+ ''' % ('\n'.join(uwsgi_defines), uwsgi_dot_h, hooks)
+ 
 @@ -286,7 +298,7 @@
  
  # fix argv if needed
@@ -102,6 +120,24 @@
  
      environ['wsgi.version'] = (1, 0)
      scheme = 'http'
+@@ -537,7 +551,7 @@
+ def uwsgi_pypy_uwsgi_register_signal(signum, kind, handler):
+     cb = ffi.callback('void(int)', handler)
+     uwsgi_gc.append(cb)
+-    if lib.uwsgi_register_signal(signum, ffi.new("char[]", kind), cb, lib.pypy_plugin.modifier1) < 0:
++    if lib.uwsgi_register_signal(signum, ffi.new("char[]", kind), cb, lib.pypy3_plugin.modifier1) < 0:
+         raise Exception("unable to register signal %d" % signum)
+ uwsgi.register_signal = uwsgi_pypy_uwsgi_register_signal
+ 
+@@ -562,7 +576,7 @@
+     rpc_func = uwsgi_pypy_RPC(func)
+     cb = ffi.callback("int(int, char*[], int[], char**)", rpc_func)
+     uwsgi_gc.append(cb)
+-    if lib.uwsgi_register_rpc(ffi.new("char[]", name), ffi.addressof(lib.pypy_plugin), argc, cb) < 0:
++    if lib.uwsgi_register_rpc(ffi.new("char[]", name), ffi.addressof(lib.pypy3_plugin), argc, cb) < 0:
+         raise Exception("unable to register rpc func %s" % name)
+ uwsgi.register_rpc = uwsgi_pypy_uwsgi_register_rpc
+ 
 @@ -598,8 +612,8 @@
  
  def uwsgi_pypy_call(func, *args):