rewrite GetVariable stuff once again - this time it works
commitcb74a96ca911b4d98abe7cacc31655380c7e4ff6
authorBenjamin Otte <otte@gnome.org>
Sun, 23 Sep 2007 01:48:22 +0000 (23 03:48 +0200)
committerBenjamin Otte <otte@gnome.org>
Sun, 23 Sep 2007 01:48:22 +0000 (23 03:48 +0200)
treedec78e1608e79fb182597dc934f923a00afa5324
parent461d0a1527bb44e0512954bb0c6dc24d732c0305
rewrite GetVariable stuff once again - this time it works

for anybody caring about how exactly this works, here's a rough guide:

First, categorize the string:
1) If it contains a dot or colon, use long lookup.
2) If it contains slashes, split by slashes, look up movies/variables using
   lookup magic
3) do swfdec_as_object_get_variable() with the given string.

For case 1, do this:
Find the last occurence of a dot or colon. The stuff behind it will be the
variable we look up using swfdec_as_object_get_variable() in the end. (Note
that it may contain slashes.) The stuff before that dot or colon is our lookup
string.
In the lookup string, split the string using dots, colons and slashes. Then use
the lookup magic to look up the variables. Note that the 3 delimiters are
special:
- After a slash, dots aren't delimiters any more.
- Two dots following each other work the same way as a slash
- A colon is ignored if it doesn't follow a preceeding variable (so "::::::a" is
  a valid lookup string, which makes "::::::a.a" a valid GetVariable string)

Confused yet?
libswfdec/swfdec_as_interpret.c