aboutsummaryrefslogtreecommitdiffstats
path: root/src/data.c
diff options
context:
space:
mode:
authorKim F. Storm2006-07-13 13:43:44 +0000
committerKim F. Storm2006-07-13 13:43:44 +0000
commit64de53d81bc8ebdafaafbe377de0a941b53c2e8c (patch)
tree7616acf4a61058e583da7930399a452130c4d8fa /src/data.c
parent14c5155a18934ab22c052886978661abe0a259df (diff)
downloademacs-64de53d81bc8ebdafaafbe377de0a941b53c2e8c.tar.gz
emacs-64de53d81bc8ebdafaafbe377de0a941b53c2e8c.zip
(Findirect_function): Optimize for no indirection.
Diffstat (limited to 'src/data.c')
-rw-r--r--src/data.c17
1 files changed, 11 insertions, 6 deletions
diff --git a/src/data.c b/src/data.c
index 0b46fceb298..f715be56cee 100644
--- a/src/data.c
+++ b/src/data.c
@@ -1913,13 +1913,18 @@ function chain of symbols. */)
1913{ 1913{
1914 Lisp_Object result; 1914 Lisp_Object result;
1915 1915
1916 result = indirect_function (object); 1916 /* Optimize for no indirection. */
1917 result = object;
1918 if (SYMBOLP (result) && !EQ (result, Qunbound)
1919 && (result = XSYMBOL (result)->function, SYMBOLP (result)))
1920 result = indirect_function (result);
1921 if (!EQ (result, Qunbound))
1922 return result;
1917 1923
1918 if (EQ (result, Qunbound)) 1924 if (NILP (noerror))
1919 return (NILP (noerror) 1925 Fsignal (Qvoid_function, Fcons (object, Qnil));
1920 ? Fsignal (Qvoid_function, Fcons (object, Qnil)) 1926
1921 : Qnil); 1927 return Qnil;
1922 return result;
1923} 1928}
1924 1929
1925/* Extract and set vector and string elements */ 1930/* Extract and set vector and string elements */