View | Details | Raw Unified | Return to bug 268278
Collapse All | Expand All

(-)b/graphics/py-pygraphviz/files/patch-pygraphviz_graphviz__wrap.c (+36 lines)
Added Link Here
1
--- pygraphviz/graphviz_wrap.c.orig	2020-08-05 09:03:40 UTC
2
+++ pygraphviz/graphviz_wrap.c
3
@@ -3030,7 +3030,7 @@ SWIG_FromCharPtr(const char *cptr)
4
 }
5
   
6
 
7
-  int agattr_label(Agraph_t *g, int kind, char *name, char *val)
8
+  Agsym_t *agattr_label(Agraph_t *g, int kind, char *name, char *val)
9
 {
10
     int len;
11
     char *hs;
12
@@ -4364,7 +4364,7 @@ SWIGINTERN PyObject *_wrap_agattr_label(PyObject *SWIG
13
   char *buf4 = 0 ;
14
   int alloc4 = 0 ;
15
   PyObject *swig_obj[4] ;
16
-  int result;
17
+  Agsym_t *result = 0 ;
18
   
19
   if (!SWIG_Python_UnpackTuple(args, "agattr_label", 4, 4, swig_obj)) SWIG_fail;
20
   res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_Agraph_t, 0 |  0 );
21
@@ -4388,13 +4388,13 @@ SWIGINTERN PyObject *_wrap_agattr_label(PyObject *SWIG
22
   }
23
   arg4 = (char *)(buf4);
24
   {
25
-    result = (int)agattr_label(arg1,arg2,arg3,arg4);
26
+    result = (Agsym_t *)agattr_label(arg1,arg2,arg3,arg4);
27
     if (!result) {
28
       PyErr_SetString(PyExc_KeyError,"agattr_label: no key");
29
       return NULL;
30
     }
31
   }
32
-  resultobj = SWIG_From_int((int)(result));
33
+  resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_Agsym_t, 0 |  0 );
34
   if (alloc3 == SWIG_NEWOBJ) free((char*)buf3);
35
   if (alloc4 == SWIG_NEWOBJ) free((char*)buf4);
36
   return resultobj;

Return to bug 268278