1
0
Fork 0

Avoid masking math.h exported variables

Our beloved math.h exports, from bits/mathcalls.h, a bare "y1" symbol.
Apparently, it's unthinkable for code including <math.h> to also declare
arguments or variable named "y0", "y1" and "yn".

Anyway, the quick fix already used elsewhere in Clutter's codebase is
to rename the colliding variables "y_0", "y_1" and "y_n" - and
obviously everything similar to them as well, using the same pattern.
This commit is contained in:
Emmanuele Bassi 2008-12-19 18:21:36 +00:00
parent 42bba13135
commit 4e493d1937
2 changed files with 44 additions and 40 deletions

View file

@ -419,43 +419,45 @@ clutter_path_add_rel_line_to (ClutterPath *path,
/** /**
* clutter_path_add_curve_to: * clutter_path_add_curve_to:
* @path: a #ClutterPath * @path: a #ClutterPath
* @x1: the x coordinate of the first control point * @x_1: the x coordinate of the first control point
* @y1: the y coordinate of the first control point * @y_1: the y coordinate of the first control point
* @x2: the x coordinate of the second control point * @x_2: the x coordinate of the second control point
* @y2: the y coordinate of the second control point * @y_2: the y coordinate of the second control point
* @x3: the x coordinate of the third control point * @x_3: the x coordinate of the third control point
* @y3: the y coordinate of the third control point * @y_3: the y coordinate of the third control point
* *
* Adds a #CLUTTER_PATH_CURVE_TO type node to the path. This causes * Adds a #CLUTTER_PATH_CURVE_TO type node to the path. This causes
* the actor to follow a bezier from the last node to (x3,y3) using * the actor to follow a bezier from the last node to (@x_3, @y_3) using
* (x1,y1) and (x2,y2) as control points. * (@x_1, @y_1) and (@x_2,@y_2) as control points.
* *
* Since: 1.0 * Since: 1.0
*/ */
void void
clutter_path_add_curve_to (ClutterPath *path, clutter_path_add_curve_to (ClutterPath *path,
gint x1, gint x_1,
gint y1, gint y_1,
gint x2, gint x_2,
gint y2, gint y_2,
gint x3, gint x_3,
gint y3) gint y_3)
{ {
g_return_if_fail (CLUTTER_IS_PATH (path)); g_return_if_fail (CLUTTER_IS_PATH (path));
clutter_path_add_node_helper (path, CLUTTER_PATH_CURVE_TO, 3, clutter_path_add_node_helper (path, CLUTTER_PATH_CURVE_TO, 3,
x1, y1, x2, y2, x3, y3); x_1, y_1,
x_2, y_2,
x_3, y_3);
} }
/** /**
* clutter_path_add_rel_curve_to: * clutter_path_add_rel_curve_to:
* @path: a #ClutterPath * @path: a #ClutterPath
* @x1: the x coordinate of the first control point * @x_1: the x coordinate of the first control point
* @y1: the y coordinate of the first control point * @y_1: the y coordinate of the first control point
* @x2: the x coordinate of the second control point * @x_2: the x coordinate of the second control point
* @y2: the y coordinate of the second control point * @y_2: the y coordinate of the second control point
* @x3: the x coordinate of the third control point * @x_3: the x coordinate of the third control point
* @y3: the y coordinate of the third control point * @y_3: the y coordinate of the third control point
* *
* Same as clutter_path_add_curve_to() except the coordinates are * Same as clutter_path_add_curve_to() except the coordinates are
* relative to the previous node. * relative to the previous node.
@ -464,17 +466,19 @@ clutter_path_add_curve_to (ClutterPath *path,
*/ */
void void
clutter_path_add_rel_curve_to (ClutterPath *path, clutter_path_add_rel_curve_to (ClutterPath *path,
gint x1, gint x_1,
gint y1, gint y_1,
gint x2, gint x_2,
gint y2, gint y_2,
gint x3, gint x_3,
gint y3) gint y_3)
{ {
g_return_if_fail (CLUTTER_IS_PATH (path)); g_return_if_fail (CLUTTER_IS_PATH (path));
clutter_path_add_node_helper (path, CLUTTER_PATH_REL_CURVE_TO, 3, clutter_path_add_node_helper (path, CLUTTER_PATH_REL_CURVE_TO, 3,
x1, y1, x2, y2, x3, y3); x_1, y_1,
x_2, y_2,
x_3, y_3);
} }
/** /**

View file

@ -161,19 +161,19 @@ void clutter_path_add_rel_line_to (ClutterPath *path,
gint x, gint x,
gint y); gint y);
void clutter_path_add_curve_to (ClutterPath *path, void clutter_path_add_curve_to (ClutterPath *path,
gint x1, gint x_1,
gint y1, gint y_1,
gint x2, gint x_2,
gint y2, gint y_2,
gint x3, gint x_3,
gint y3); gint y_3);
void clutter_path_add_rel_curve_to (ClutterPath *path, void clutter_path_add_rel_curve_to (ClutterPath *path,
gint x1, gint x_1,
gint y1, gint y_1,
gint x2, gint x_2,
gint y2, gint y_2,
gint x3, gint x_3,
gint y3); gint y_3);
void clutter_path_add_close (ClutterPath *path); void clutter_path_add_close (ClutterPath *path);
gboolean clutter_path_add_string (ClutterPath *path, gboolean clutter_path_add_string (ClutterPath *path,
const gchar *str); const gchar *str);