[m-rev.] diff: Fix variable names clashing with mingw-w64 macros.

Peter Wang novalazy at gmail.com
Fri Jul 12 14:42:57 AEST 2019


deep_profiler/measurements.m:
    Rename "PC" variables to avoid a name conflict. mingw-w64's float.h
    defines macros named PC_24, PC_54, PC_64 which can clash with "PC"
    variables with the variable number suffix.

diff --git a/deep_profiler/measurements.m b/deep_profiler/measurements.m
index 09bbfc8b7..157d87ec5 100644
--- a/deep_profiler/measurements.m
+++ b/deep_profiler/measurements.m
@@ -867,12 +867,12 @@ goal_cost_change_calls(non_trivial_goal(Cost0, Calls0), Calls) =
 :- func cost_get_total(float, cost) = float.
 
 cost_get_total(_, cost_total(Total)) = Total.
-cost_get_total(Calls, cost_per_call(PC)) = Calls * PC.
+cost_get_total(Calls, cost_per_call(Percall)) = Calls * Percall.
 
 :- func cost_get_percall(float, cost) = float.
 
 cost_get_percall(Calls, cost_total(Total)) = Total / Calls.
-cost_get_percall(_, cost_per_call(PC)) = PC.
+cost_get_percall(_, cost_per_call(Percall)) = Percall.
 
 :- func (cost) / (int) = cost.
 
@@ -887,8 +887,10 @@ Cost0 / Denom = Cost :-
 
 :- func cost_by_weight(float, cost) = cost.
 
-cost_by_weight(Weight, cost_total(Total)) = cost_total(Total * Weight).
-cost_by_weight(Weight, cost_per_call(PC)) = cost_per_call(PC * Weight).
+cost_by_weight(Weight, cost_total(Total)) =
+    cost_total(Total * Weight).
+cost_by_weight(Weight, cost_per_call(Percall)) =
+    cost_per_call(Percall * Weight).
 
 :- func sum_costs(float, cost, float, cost) = cost.
 
-- 
2.21.0



More information about the reviews mailing list