Commit 3a838d24 authored by Kirill Smelkov's avatar Kirill Smelkov

libgolang/{thread,gevent}: Switch runtimes to C++

We will soon need to use common functionality(*) from both runtimes and
other packages. The "other packages" are all C++ and it is handy to keep
common functionality in C++ as well. While we could also maintain
`extern "C"` interface, it duplicates the work. Let's switch everything
to C++ to ease further maintenance.

(*) e.g. package internal/syscall from both runtimes and from package os.

/reviewed-on !17
parent 1fad944d
/_runtime_gevent.c
/_runtime_thread.c
/_runtime_gevent.cpp
/_runtime_thread.cpp
# cython: language_level=2
# Copyright (C) 2019 Nexedi SA and Contributors.
# Kirill Smelkov <kirr@nexedi.com>
# Copyright (C) 2019-2022 Nexedi SA and Contributors.
# Kirill Smelkov <kirr@nexedi.com>
#
# This program is free software: you can Use, Study, Modify and Redistribute
# it under the terms of the GNU General Public License version 3, or (at your
......@@ -21,7 +21,7 @@
from libc.stdint cimport uint64_t
cdef extern from "golang/libgolang.h" nogil:
cdef extern from "golang/libgolang.h" namespace "golang" nogil:
struct _libgolang_sema
enum _libgolang_runtime_flags:
STACK_DEAD_WHILE_PARKED
......
# pygolang | pythonic package setup
# Copyright (C) 2018-2020 Nexedi SA and Contributors.
# Copyright (C) 2018-2022 Nexedi SA and Contributors.
# Kirill Smelkov <kirr@nexedi.com>
#
# This program is free software: you can Use, Study, Modify and Redistribute
......@@ -233,12 +233,10 @@ setup(
['golang/_golang.pyx']),
Ext('golang.runtime._runtime_thread',
['golang/runtime/_runtime_thread.pyx'],
language = "c"),
['golang/runtime/_runtime_thread.pyx']),
Ext('golang.runtime._runtime_gevent',
['golang/runtime/_runtime_gevent.pyx'],
language = 'c'),
['golang/runtime/_runtime_gevent.pyx']),
Ext('golang.pyx.runtime',
['golang/pyx/runtime.pyx'],
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment