Sign Up
Log In
Log In
or
Sign Up
Places
All Projects
Status Monitor
Collapse sidebar
home:Ledest:erlang:25
cpg
0008-Erlang-OTP-18-compatable-map-type-syntax.p...
Overview
Repositories
Revisions
Requests
Users
Attributes
Meta
File 0008-Erlang-OTP-18-compatable-map-type-syntax.patch of Package cpg
From 7084f71d30a16a687ada03bd2f2ea096751de64a Mon Sep 17 00:00:00 2001 From: Led <ledest@gmail.com> Date: Mon, 29 Oct 2018 14:28:11 +0200 Subject: [PATCH 08/15] Erlang/OTP 18 compatable map type syntax --- src/cpg.erl | 12 ++++++++++++ src/cpg_node_monitor.erl | 8 ++++++++ 2 files changed, 20 insertions(+) diff --git a/src/cpg.erl b/src/cpg.erl index d848118..03811f2 100644 --- a/src/cpg.erl +++ b/src/cpg.erl @@ -198,6 +198,17 @@ names :: list(name()) }). +-ifdef(ERLANG_OTP_VERSION_18). +-record(state, + { + scope :: scope(), % locally registered process name + groups :: cpg_data:state(), % GroupName -> #cpg_data{} + monitors = #{} :: #{pid() => #state_monitor{}}, + node_monitors = #{} :: #{node() => cpg_node_monitor:process()}, + callbacks = undefined :: undefined | pid(), + listen :: visible | all + }). +-else. -record(state, { scope :: scope(), % locally registered process name @@ -207,6 +218,7 @@ callbacks = undefined :: undefined | pid(), listen :: visible | all }). +-endif. -compile({inline, [{join_impl, 4}, diff --git a/src/cpg_node_monitor.erl b/src/cpg_node_monitor.erl index 6570273..4b07d2f 100644 --- a/src/cpg_node_monitor.erl +++ b/src/cpg_node_monitor.erl @@ -49,11 +49,19 @@ -export([init/1, handle_call/3, handle_cast/2, handle_info/2, code_change/3, terminate/2]). +-ifdef(ERLANG_OTP_VERSION_18). +-record(state, + { + parent :: pid(), + monitors :: #{pid() => reference()} + }). +-else. -record(state, { parent :: pid(), monitors :: #{pid() := reference()} }). +-endif. -type process() :: pid(). -export_type([process/0]). -- 2.16.4
Locations
Projects
Search
Status Monitor
Help
OpenBuildService.org
Documentation
API Documentation
Code of Conduct
Contact
Support
@OBShq
Terms
openSUSE Build Service is sponsored by
The Open Build Service is an
openSUSE project
.
Sign Up
Log In
Places
Places
All Projects
Status Monitor