From 9e4624f256a256df595a0169908f28721fc4cdf3 Mon Sep 17 00:00:00 2001
From: Khem Raj <raj.khem@gmail.com>
Date: Wed, 9 Apr 2025 23:17:12 -0700
Subject: [PATCH] Change types for width/height to match definitions in
 BufferRegion

This is found with clang

Fixes
../matplotlib-3.10.1/src/_backend_agg_wrapper.cpp:253:17: error: non-constant-expression cannot be narrowed from type 'unsigned int' to 'int' in initializer list [-Wc++11-narrowing]

Upstream-Status: Submitted [https://github.com/matplotlib/matplotlib/pull/29894]
Signed-off-by: Khem Raj <raj.khem@gmail.com>
---
 src/_backend_agg.h | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/src/_backend_agg.h b/src/_backend_agg.h
index 8010508..29bb81a 100644
--- a/src/_backend_agg.h
+++ b/src/_backend_agg.h
@@ -132,12 +132,12 @@ class RendererAgg
 
     virtual ~RendererAgg();
 
-    unsigned int get_width()
+    int get_width()
     {
         return width;
     }
 
-    unsigned int get_height()
+    int get_height()
     {
         return height;
     }
@@ -205,7 +205,7 @@ class RendererAgg
     void restore_region(BufferRegion &reg);
     void restore_region(BufferRegion &region, int xx1, int yy1, int xx2, int yy2, int x, int y);
 
-    unsigned int width, height;
+    int width, height;
     double dpi;
     size_t NUMBYTES; // the number of bytes in buffer
 
