script: Hide private symbols
A bunch of private functions we use when parsing got exposed accidentaly to the list of public symbols by virtue of not having the leading '_' that we use to filter them out of the shared object — all the while the header that declares them is a private, non installed one. Let's rectify this situation with a bit of minor surgery on the code.
This commit is contained in:
parent
9f70ea8dee
commit
bcd37e2e3d
@ -303,7 +303,7 @@ clutter_alpha_parse_custom_node (ClutterScriptable *scriptable,
|
||||
{
|
||||
gulong mode;
|
||||
|
||||
mode = clutter_script_resolve_animation_mode (node);
|
||||
mode = _clutter_script_resolve_animation_mode (node);
|
||||
|
||||
g_value_init (value, G_TYPE_ULONG);
|
||||
g_value_set_ulong (value, mode);
|
||||
|
@ -431,7 +431,7 @@ clutter_animation_parse_custom_node (ClutterScriptable *scriptable,
|
||||
{
|
||||
gulong mode;
|
||||
|
||||
mode = clutter_script_resolve_animation_mode (node);
|
||||
mode = _clutter_script_resolve_animation_mode (node);
|
||||
|
||||
g_value_init (value, G_TYPE_ULONG);
|
||||
g_value_set_ulong (value, mode);
|
||||
|
@ -1513,9 +1513,9 @@ resolve_interpolation (JsonNode *node)
|
||||
gboolean res;
|
||||
gint enum_value;
|
||||
|
||||
res = clutter_script_enum_from_string (CLUTTER_TYPE_INTERPOLATION,
|
||||
str,
|
||||
&enum_value);
|
||||
res = _clutter_script_enum_from_string (CLUTTER_TYPE_INTERPOLATION,
|
||||
str,
|
||||
&enum_value);
|
||||
if (res)
|
||||
return enum_value;
|
||||
}
|
||||
@ -1620,7 +1620,7 @@ parse_animator_property (JsonArray *array,
|
||||
gboolean res;
|
||||
|
||||
progress = json_array_get_double_element (key, 0);
|
||||
mode = clutter_script_resolve_animation_mode (json_array_get_element (key, 1));
|
||||
mode = _clutter_script_resolve_animation_mode (json_array_get_element (key, 1));
|
||||
|
||||
animator_key = clutter_animator_key_new (clos->animator,
|
||||
gobject,
|
||||
@ -1628,11 +1628,11 @@ parse_animator_property (JsonArray *array,
|
||||
progress,
|
||||
mode);
|
||||
|
||||
res = clutter_script_parse_node (clos->script,
|
||||
&(animator_key->value),
|
||||
pname,
|
||||
json_array_get_element (key, 2),
|
||||
pspec);
|
||||
res = _clutter_script_parse_node (clos->script,
|
||||
&(animator_key->value),
|
||||
pname,
|
||||
json_array_get_element (key, 2),
|
||||
pspec);
|
||||
if (!res)
|
||||
{
|
||||
g_warning ("Unable to parse the key value for the "
|
||||
|
@ -680,9 +680,9 @@ clutter_model_set_custom_property (ClutterScriptable *scriptable,
|
||||
column_name = clutter_model_get_column_name (model, i);
|
||||
columns[i] = i;
|
||||
g_value_init (&v, column_type);
|
||||
clutter_script_parse_node (script, &v, column_name,
|
||||
json_array_get_element (array, i),
|
||||
NULL);
|
||||
_clutter_script_parse_node (script, &v, column_name,
|
||||
json_array_get_element (array, i),
|
||||
NULL);
|
||||
g_value_array_append (values, &v);
|
||||
g_value_unset (&v);
|
||||
}
|
||||
@ -719,9 +719,9 @@ clutter_model_set_custom_property (ClutterScriptable *scriptable,
|
||||
columns[column] = i;
|
||||
g_value_init (&v, col_type);
|
||||
member = json_object_get_member (object, mname);
|
||||
clutter_script_parse_node (script, &v,
|
||||
col_name, member,
|
||||
NULL);
|
||||
_clutter_script_parse_node (script, &v,
|
||||
col_name, member,
|
||||
NULL);
|
||||
g_value_array_append (values, &v);
|
||||
g_value_unset (&v);
|
||||
break;
|
||||
|
@ -66,7 +66,7 @@ clutter_script_parser_init (ClutterScriptParser *parser)
|
||||
}
|
||||
|
||||
GType
|
||||
clutter_script_get_type_from_symbol (const gchar *symbol)
|
||||
_clutter_script_get_type_from_symbol (const gchar *symbol)
|
||||
{
|
||||
static GModule *module = NULL;
|
||||
GTypeGetFunc func;
|
||||
@ -82,7 +82,7 @@ clutter_script_get_type_from_symbol (const gchar *symbol)
|
||||
}
|
||||
|
||||
GType
|
||||
clutter_script_get_type_from_class (const gchar *name)
|
||||
_clutter_script_get_type_from_class (const gchar *name)
|
||||
{
|
||||
static GModule *module = NULL;
|
||||
GString *symbol_name = g_string_sized_new (64);
|
||||
@ -160,9 +160,9 @@ clutter_script_get_type_from_class (const gchar *name)
|
||||
* Return value: %TRUE if the conversion was successfull.
|
||||
*/
|
||||
gboolean
|
||||
clutter_script_enum_from_string (GType type,
|
||||
const gchar *string,
|
||||
gint *enum_value)
|
||||
_clutter_script_enum_from_string (GType type,
|
||||
const gchar *string,
|
||||
gint *enum_value)
|
||||
{
|
||||
GEnumClass *eclass;
|
||||
GEnumValue *ev;
|
||||
@ -195,9 +195,9 @@ clutter_script_enum_from_string (GType type,
|
||||
}
|
||||
|
||||
gboolean
|
||||
clutter_script_flags_from_string (GType type,
|
||||
const gchar *string,
|
||||
gint *flags_value)
|
||||
_clutter_script_flags_from_string (GType type,
|
||||
const gchar *string,
|
||||
gint *flags_value)
|
||||
{
|
||||
gchar *endptr, *prevptr;
|
||||
guint i, j, ret, value;
|
||||
@ -323,9 +323,9 @@ parse_knot_from_object (JsonObject *object,
|
||||
}
|
||||
|
||||
gboolean
|
||||
clutter_script_parse_knot (ClutterScript *script,
|
||||
JsonNode *node,
|
||||
ClutterKnot *knot)
|
||||
_clutter_script_parse_knot (ClutterScript *script,
|
||||
JsonNode *node,
|
||||
ClutterKnot *knot)
|
||||
{
|
||||
g_return_val_if_fail (CLUTTER_IS_SCRIPT (script), FALSE);
|
||||
g_return_val_if_fail (node != NULL, FALSE);
|
||||
@ -389,9 +389,9 @@ parse_geometry_from_object (JsonObject *object,
|
||||
}
|
||||
|
||||
gboolean
|
||||
clutter_script_parse_geometry (ClutterScript *script,
|
||||
JsonNode *node,
|
||||
ClutterGeometry *geometry)
|
||||
_clutter_script_parse_geometry (ClutterScript *script,
|
||||
JsonNode *node,
|
||||
ClutterGeometry *geometry)
|
||||
{
|
||||
g_return_val_if_fail (CLUTTER_IS_SCRIPT (script), FALSE);
|
||||
g_return_val_if_fail (node != NULL, FALSE);
|
||||
@ -460,9 +460,9 @@ parse_color_from_object (JsonObject *object,
|
||||
}
|
||||
|
||||
gboolean
|
||||
clutter_script_parse_color (ClutterScript *script,
|
||||
JsonNode *node,
|
||||
ClutterColor *color)
|
||||
_clutter_script_parse_color (ClutterScript *script,
|
||||
JsonNode *node,
|
||||
ClutterColor *color)
|
||||
{
|
||||
g_return_val_if_fail (CLUTTER_IS_SCRIPT (script), FALSE);
|
||||
g_return_val_if_fail (node != NULL, FALSE);
|
||||
@ -774,7 +774,7 @@ static const struct
|
||||
static const gint n_animation_modes = G_N_ELEMENTS (animation_modes);
|
||||
|
||||
gulong
|
||||
clutter_script_resolve_animation_mode (JsonNode *node)
|
||||
_clutter_script_resolve_animation_mode (JsonNode *node)
|
||||
{
|
||||
gint i, res = CLUTTER_CUSTOM_MODE;
|
||||
|
||||
@ -800,9 +800,9 @@ clutter_script_resolve_animation_mode (JsonNode *node)
|
||||
return animation_modes[i].mode;
|
||||
}
|
||||
|
||||
if (clutter_script_enum_from_string (CLUTTER_TYPE_ANIMATION_MODE,
|
||||
name,
|
||||
&res))
|
||||
if (_clutter_script_enum_from_string (CLUTTER_TYPE_ANIMATION_MODE,
|
||||
name,
|
||||
&res))
|
||||
return res;
|
||||
|
||||
g_warning ("Unable to find the animation mode '%s'", name);
|
||||
@ -869,7 +869,7 @@ _clutter_script_parse_alpha (ClutterScript *script,
|
||||
|
||||
val = json_object_get_member (object, "mode");
|
||||
if (val != NULL)
|
||||
mode = clutter_script_resolve_animation_mode (val);
|
||||
mode = _clutter_script_resolve_animation_mode (val);
|
||||
|
||||
if (mode == CLUTTER_CUSTOM_MODE)
|
||||
{
|
||||
@ -1083,11 +1083,11 @@ clutter_script_parser_parse_end (JsonParser *parser)
|
||||
}
|
||||
|
||||
gboolean
|
||||
clutter_script_parse_node (ClutterScript *script,
|
||||
GValue *value,
|
||||
const gchar *name,
|
||||
JsonNode *node,
|
||||
GParamSpec *pspec)
|
||||
_clutter_script_parse_node (ClutterScript *script,
|
||||
GValue *value,
|
||||
const gchar *name,
|
||||
JsonNode *node,
|
||||
GParamSpec *pspec)
|
||||
{
|
||||
GValue node_value = { 0, };
|
||||
gboolean retval = FALSE;
|
||||
@ -1155,7 +1155,7 @@ clutter_script_parse_node (ClutterScript *script,
|
||||
|
||||
/* knot := { "x" : (int), "y" : (int) } */
|
||||
|
||||
if (clutter_script_parse_knot (script, node, &knot))
|
||||
if (_clutter_script_parse_knot (script, node, &knot))
|
||||
{
|
||||
g_value_set_boxed (value, &knot);
|
||||
return TRUE;
|
||||
@ -1173,7 +1173,7 @@ clutter_script_parse_node (ClutterScript *script,
|
||||
* }
|
||||
*/
|
||||
|
||||
if (clutter_script_parse_geometry (script, node, &geom))
|
||||
if (_clutter_script_parse_geometry (script, node, &geom))
|
||||
{
|
||||
g_value_set_boxed (value, &geom);
|
||||
return TRUE;
|
||||
@ -1191,7 +1191,7 @@ clutter_script_parse_node (ClutterScript *script,
|
||||
* }
|
||||
*/
|
||||
|
||||
if (clutter_script_parse_color (script, node, &color))
|
||||
if (_clutter_script_parse_color (script, node, &color))
|
||||
{
|
||||
g_value_set_boxed (value, &color);
|
||||
return TRUE;
|
||||
@ -1214,7 +1214,7 @@ clutter_script_parse_node (ClutterScript *script,
|
||||
|
||||
/* knot := [ (int), (int) ] */
|
||||
|
||||
if (clutter_script_parse_knot (script, node, &knot))
|
||||
if (_clutter_script_parse_knot (script, node, &knot))
|
||||
{
|
||||
g_value_set_boxed (value, &knot);
|
||||
return TRUE;
|
||||
@ -1226,7 +1226,7 @@ clutter_script_parse_node (ClutterScript *script,
|
||||
|
||||
/* geometry := [ (int), (int), (int), (int) ] */
|
||||
|
||||
if (clutter_script_parse_geometry (script, node, &geom))
|
||||
if (_clutter_script_parse_geometry (script, node, &geom))
|
||||
{
|
||||
g_value_set_boxed (value, &geom);
|
||||
return TRUE;
|
||||
@ -1238,7 +1238,7 @@ clutter_script_parse_node (ClutterScript *script,
|
||||
|
||||
/* color := [ (int), (int), (int), (int) ] */
|
||||
|
||||
if (clutter_script_parse_color (script, node, &color))
|
||||
if (_clutter_script_parse_color (script, node, &color))
|
||||
{
|
||||
g_value_set_boxed (value, &color);
|
||||
return TRUE;
|
||||
@ -1337,9 +1337,9 @@ clutter_script_parse_node (ClutterScript *script,
|
||||
{
|
||||
gint enum_value;
|
||||
|
||||
retval = clutter_script_enum_from_string (G_VALUE_TYPE (value),
|
||||
g_value_get_string (&node_value),
|
||||
&enum_value);
|
||||
retval = _clutter_script_enum_from_string (G_VALUE_TYPE (value),
|
||||
g_value_get_string (&node_value),
|
||||
&enum_value);
|
||||
if (retval)
|
||||
g_value_set_enum (value, enum_value);
|
||||
}
|
||||
@ -1355,9 +1355,9 @@ clutter_script_parse_node (ClutterScript *script,
|
||||
{
|
||||
gint flags_value;
|
||||
|
||||
retval = clutter_script_flags_from_string (G_VALUE_TYPE (value),
|
||||
g_value_get_string (&node_value),
|
||||
&flags_value);
|
||||
retval = _clutter_script_flags_from_string (G_VALUE_TYPE (value),
|
||||
g_value_get_string (&node_value),
|
||||
&flags_value);
|
||||
if (retval)
|
||||
g_value_set_flags (value, flags_value);
|
||||
}
|
||||
@ -1368,7 +1368,7 @@ clutter_script_parse_node (ClutterScript *script,
|
||||
{
|
||||
ClutterColor color = { 0, };
|
||||
|
||||
retval = clutter_script_parse_color (script, node, &color);
|
||||
retval = _clutter_script_parse_color (script, node, &color);
|
||||
if (retval)
|
||||
clutter_value_set_color (value, &color);
|
||||
}
|
||||
@ -1464,10 +1464,10 @@ clutter_script_translate_parameters (ClutterScript *script,
|
||||
pinfo->node);
|
||||
|
||||
if (!res)
|
||||
res = clutter_script_parse_node (script, ¶m.value,
|
||||
pinfo->name,
|
||||
pinfo->node,
|
||||
pinfo->pspec);
|
||||
res = _clutter_script_parse_node (script, ¶m.value,
|
||||
pinfo->name,
|
||||
pinfo->node,
|
||||
pinfo->pspec);
|
||||
|
||||
if (!res)
|
||||
{
|
||||
@ -1534,10 +1534,10 @@ clutter_script_construct_parameters (ClutterScript *script,
|
||||
|
||||
param.name = g_strdup (pinfo->name);
|
||||
|
||||
if (!clutter_script_parse_node (script, ¶m.value,
|
||||
pinfo->name,
|
||||
pinfo->node,
|
||||
pinfo->pspec))
|
||||
if (!_clutter_script_parse_node (script, ¶m.value,
|
||||
pinfo->name,
|
||||
pinfo->node,
|
||||
pinfo->pspec))
|
||||
{
|
||||
unparsed = g_list_prepend (unparsed, pinfo);
|
||||
continue;
|
||||
@ -1626,10 +1626,10 @@ apply_layout_properties (ClutterScript *script,
|
||||
pinfo->node);
|
||||
|
||||
if (!res)
|
||||
res = clutter_script_parse_node (script, &value,
|
||||
name,
|
||||
pinfo->node,
|
||||
pinfo->pspec);
|
||||
res = _clutter_script_parse_node (script, &value,
|
||||
name,
|
||||
pinfo->node,
|
||||
pinfo->pspec);
|
||||
|
||||
if (!res)
|
||||
{
|
||||
@ -1726,10 +1726,10 @@ apply_child_properties (ClutterScript *script,
|
||||
pinfo->node);
|
||||
|
||||
if (!res)
|
||||
res = clutter_script_parse_node (script, &value,
|
||||
name,
|
||||
pinfo->node,
|
||||
pinfo->pspec);
|
||||
res = _clutter_script_parse_node (script, &value,
|
||||
name,
|
||||
pinfo->node,
|
||||
pinfo->pspec);
|
||||
|
||||
if (!res)
|
||||
{
|
||||
@ -1952,7 +1952,7 @@ _clutter_script_construct_object (ClutterScript *script,
|
||||
if (oinfo->gtype == G_TYPE_INVALID)
|
||||
{
|
||||
if (G_UNLIKELY (oinfo->type_func))
|
||||
oinfo->gtype = clutter_script_get_type_from_symbol (oinfo->type_func);
|
||||
oinfo->gtype = _clutter_script_get_type_from_symbol (oinfo->type_func);
|
||||
else
|
||||
oinfo->gtype = clutter_script_get_type_from_name (script, oinfo->class_name);
|
||||
|
||||
|
@ -101,33 +101,33 @@ void property_info_free (gpointer data);
|
||||
|
||||
GType clutter_script_parser_get_type (void) G_GNUC_CONST;
|
||||
|
||||
gboolean clutter_script_parse_node (ClutterScript *script,
|
||||
GValue *value,
|
||||
const gchar *name,
|
||||
JsonNode *node,
|
||||
GParamSpec *pspec);
|
||||
gboolean _clutter_script_parse_node (ClutterScript *script,
|
||||
GValue *value,
|
||||
const gchar *name,
|
||||
JsonNode *node,
|
||||
GParamSpec *pspec);
|
||||
|
||||
GType clutter_script_get_type_from_symbol (const gchar *symbol);
|
||||
GType clutter_script_get_type_from_class (const gchar *name);
|
||||
GType _clutter_script_get_type_from_symbol (const gchar *symbol);
|
||||
GType _clutter_script_get_type_from_class (const gchar *name);
|
||||
|
||||
gulong clutter_script_resolve_animation_mode (JsonNode *node);
|
||||
gulong _clutter_script_resolve_animation_mode (JsonNode *node);
|
||||
|
||||
gboolean clutter_script_enum_from_string (GType gtype,
|
||||
const gchar *string,
|
||||
gint *enum_value);
|
||||
gboolean clutter_script_flags_from_string (GType gtype,
|
||||
const gchar *string,
|
||||
gint *flags_value);
|
||||
gboolean _clutter_script_enum_from_string (GType gtype,
|
||||
const gchar *string,
|
||||
gint *enum_value);
|
||||
gboolean _clutter_script_flags_from_string (GType gtype,
|
||||
const gchar *string,
|
||||
gint *flags_value);
|
||||
|
||||
gboolean clutter_script_parse_knot (ClutterScript *script,
|
||||
JsonNode *node,
|
||||
ClutterKnot *knot);
|
||||
gboolean clutter_script_parse_geometry (ClutterScript *script,
|
||||
JsonNode *node,
|
||||
ClutterGeometry *geometry);
|
||||
gboolean clutter_script_parse_color (ClutterScript *script,
|
||||
JsonNode *node,
|
||||
ClutterColor *color);
|
||||
gboolean _clutter_script_parse_knot (ClutterScript *script,
|
||||
JsonNode *node,
|
||||
ClutterKnot *knot);
|
||||
gboolean _clutter_script_parse_geometry (ClutterScript *script,
|
||||
JsonNode *node,
|
||||
ClutterGeometry *geometry);
|
||||
gboolean _clutter_script_parse_color (ClutterScript *script,
|
||||
JsonNode *node,
|
||||
ClutterColor *color);
|
||||
GObject *_clutter_script_parse_alpha (ClutterScript *script,
|
||||
JsonNode *node);
|
||||
|
||||
|
@ -294,7 +294,7 @@ clutter_script_real_get_type_from_name (ClutterScript *script,
|
||||
if (gtype != G_TYPE_INVALID)
|
||||
return gtype;
|
||||
|
||||
return clutter_script_get_type_from_class (type_name);
|
||||
return _clutter_script_get_type_from_class (type_name);
|
||||
}
|
||||
|
||||
void
|
||||
|
@ -2136,17 +2136,17 @@ parse_state_transition (JsonArray *array,
|
||||
continue;
|
||||
}
|
||||
|
||||
mode = clutter_script_resolve_animation_mode (json_array_get_element (key, 2));
|
||||
mode = _clutter_script_resolve_animation_mode (json_array_get_element (key, 2));
|
||||
|
||||
state_key = clutter_state_key_new (target_state,
|
||||
gobject, property, pspec,
|
||||
mode);
|
||||
|
||||
res = clutter_script_parse_node (clos->script,
|
||||
&(state_key->value),
|
||||
property,
|
||||
json_array_get_element (key, 3),
|
||||
pspec);
|
||||
res = _clutter_script_parse_node (clos->script,
|
||||
&(state_key->value),
|
||||
property,
|
||||
json_array_get_element (key, 3),
|
||||
pspec);
|
||||
if (!res)
|
||||
{
|
||||
g_warning ("Unable to parse the key value for the "
|
||||
|
Loading…
Reference in New Issue
Block a user