On Thu, 19 Jan 2012 00:17:14 -0800 "Enlightenment SVN" <no-re...@enlightenment.org> wrote:
> Log: > Edje: Replace x1 -> xx1 (also y1, x2 and y2). > > This should probably become the new standard for coords as it > doesn't clash with the damn y1 posix function. > > Thasks to Gustavo for the naming. > > Author: tasn > Date: 2012-01-19 00:17:14 -0800 (Thu, 19 Jan 2012) > New Revision: 67325 > Trac: http://trac.enlightenment.org/e/changeset/67325 > > Modified: > trunk/edje/src/lib/edje_lua2.c trunk/edje/src/lib/edje_util.c > > Modified: trunk/edje/src/lib/edje_lua2.c > =================================================================== > --- trunk/edje/src/lib/edje_lua2.c 2012-01-19 08:17:12 UTC > (rev 67324) +++ trunk/edje/src/lib/edje_lua2.c 2012-01-19 > 08:17:14 UTC (rev 67325) @@ -2935,16 +2935,16 @@ > { > Edje_Lua_Obj *obj = (Edje_Lua_Obj *)lua_touserdata(L, 1); // > Stack usage [-0, +0, -] Edje_Lua_Evas_Object *elo = > (Edje_Lua_Evas_Object *)obj; > - Evas_Coord x1, y1, x2, y2; > + Evas_Coord xx1, yy1, xx2, yy2; > > if (!_elua_isa(obj, _elua_evas_line_meta)) return 0; > > - if (_elua_scan_params(L, 2, "%x1 %y1 %x2 %y2", &x1, &y1, &x2, > &y2) > 0) > + if (_elua_scan_params(L, 2, "%xx1 %yy1 %xx2 %yy2", &xx1, &yy1, > &xx2, &yy2) > 0) > { // Stack > usage [-0, +0, m] unless it's in a table [-4, +4, e] > - evas_object_line_xy_set(elo->evas_obj, x1, y1, x2, y2); > + evas_object_line_xy_set(elo->evas_obj, xx1, yy1, xx2, yy2); > } > - evas_object_line_xy_get(elo->evas_obj, &x1, &y1, &x2, &y2); > - _elua_ret(L, "%x1 %y1 %x2 %y2", x1, y1, x2, y2); > + evas_object_line_xy_get(elo->evas_obj, &xx1, &yy1, &xx2, &yy2); > + _elua_ret(L, "%xx1 %yy1 %xx2 %yy2", xx1, yy1, xx2, yy2); You just broke API. Those %y1 and friends in the strings used by the _elua_scan_params() and _elua_ret() functions are the names of Lua arguments and return values. The Lua scripts expect to have these names as table fields when calling these functions. As such, they don't clash with any posix functions, as the names are local to the tables, and Lua does not use posix names anyway. But the Lua side does expect these names to be used, so you just broke the API. Also note that you may now be clashing with yy* names in lexers and yaccers. In this case, all these variables are LOCAL, so how can they clash with any posix name that's not being used anyway? -- A big old stinking pile of genius that no one wants coz there are too many silver coated monkeys in the world.
signature.asc
Description: PGP signature
------------------------------------------------------------------------------ Keep Your Developer Skills Current with LearnDevNow! The most comprehensive online learning library for Microsoft developers is just $99.99! Visual Studio, SharePoint, SQL - plus HTML5, CSS3, MVC3, Metro Style Apps, more. Free future releases when you subscribe now! http://p.sf.net/sfu/learndevnow-d2d
_______________________________________________ enlightenment-devel mailing list enlightenment-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/enlightenment-devel