projects
/
web/konrad/twig.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
(parent:
7367cf9
)
Added the cache creating/fetching method in the code.
author
Derick Rethans
<github@derickrethans.nl>
Wed, 29 Jun 2011 11:46:46 +0000 (12:46 +0100)
committer
Derick Rethans
<github@derickrethans.nl>
Wed, 29 Jun 2011 11:46:46 +0000 (12:46 +0100)
twig.c
patch
|
blob
|
history
diff --git
a/twig.c
b/twig.c
index
1b2033e
..
e33e35b
100644
(file)
--- a/
twig.c
+++ b/
twig.c
@@
-470,8
+470,15
@@
PHP_FUNCTION(twig_template_get_attributes)
*/
char *class_name;
zend_uint class_name_len;
+ zval *tmp_self_cache;
zend_get_object_classname(object, &class_name, &class_name_len TSRMLS_CC);
+ tmp_self_cache = TWIG_GET_STATIC_PROPERTY(template, "cache");
+
+ if (!TWIG_GET_ARRAY_ELEMENT(tmp_self_cache, class_name)) {
+ twig_add_class_to_cache(tmp_self_cache, object, class_name);
+ }
+
/*
// object property
if (Twig_TemplateInterface::METHOD_CALL !== $type) {