mirror of
https://github.com/brl/mutter.git
synced 2025-06-13 16:59:30 +00:00
2007-12-06 Emmanuele Bassi <ebassi@openedhand.com>
* clutter/json/json-parser.[ch]: Use gssize, size we allow -1 as a length (meaning "use the whole string"). (json_parser_load_from_data): Use the passed length instead of using strlen() all the time. * clutter/clutter-script.[ch]: Ditto as above.
This commit is contained in:
@ -1602,7 +1602,7 @@ clutter_script_load_from_file (ClutterScript *script,
|
||||
guint
|
||||
clutter_script_load_from_data (ClutterScript *script,
|
||||
const gchar *data,
|
||||
gsize length,
|
||||
gssize length,
|
||||
GError **error)
|
||||
{
|
||||
ClutterScriptPrivate *priv;
|
||||
@ -1611,6 +1611,9 @@ clutter_script_load_from_data (ClutterScript *script,
|
||||
g_return_val_if_fail (CLUTTER_IS_SCRIPT (script), 0);
|
||||
g_return_val_if_fail (data != NULL, 0);
|
||||
|
||||
if (length < 0)
|
||||
length = strlen (data);
|
||||
|
||||
priv = script->priv;
|
||||
|
||||
g_free (priv->filename);
|
||||
|
Reference in New Issue
Block a user