mypaint / libmypaint

libmypaint, a.k.a. "brushlib", is a library for making brushstrokes which is used by MyPaint and other projects.
http://mypaint.org
Other
307 stars 87 forks source link

minimal.c broken in branch libmypaint-v1.5.x #163

Closed SleepProgger closed 4 years ago

SleepProgger commented 4 years ago
[nope@seima-pc examples]$ gcc -o minimal -I../ -I../json_build/include/json-c/ -L../json_build/lib/ -ljson minimal.c
minimal.c: In function ‘stroke_to’:
minimal.c:9:5: error: too many arguments to function ‘mypaint_brush_stroke_to’
    9 |     mypaint_brush_stroke_to
      |     ^~~~~~~~~~~~~~~~~~~~~~~
In file included from libmypaint.c:15,
                 from minimal.c:1:
../mypaint-brush.c:1198:1: note: declared here
 1198 | mypaint_brush_stroke_to(
      | ^~~~~~~~~~~~~~~~~~~~~~~
minimal.c: In function ‘main’:
minimal.c:48:59: warning: passing argument 2 of ‘mypaint_surface_end_atomic’ from incompatible pointer type [-Wincompatible-pointer-types]
   48 |     mypaint_surface_end_atomic((MyPaintSurface *)surface, &rois);
      |                                                           ^~~~~
      |                                                           |
      |                                                           MyPaintRectangles * {aka struct <anonymous> *}
In file included from libmypaint.c:20,
                 from minimal.c:1:
../mypaint-surface.c:123:68: note: expected ‘MyPaintRectangle *’ {aka ‘struct <anonymous> *’} but argument is of type ‘MyPaintRectangles *’ {aka ‘struct <anonymous> *’}
  123 | mypaint_surface_end_atomic(MyPaintSurface *self, MyPaintRectangle *roi)
      |                                                  ~~~~~~~~~~~~~~~~~~^~~

I assume that is related to the backport from 2.0 ?

jplloyd commented 4 years ago

Quite right, good catch! Fixed in 65969f0af1e7fee54345f095bec19d40b4986cce (apparently not configured to close issues from non-master branches, which I guess is a very reasonable default).

SleepProgger commented 4 years ago

Seem to work. Thanks.