diff options
| author | Etienne Kneuss <colder@php.net> | 2010-04-29 17:14:37 +0000 |
|---|---|---|
| committer | Etienne Kneuss <colder@php.net> | 2010-04-29 17:14:37 +0000 |
| commit | f9532adcc685d78f3a0e163a9231c2c377760846 (patch) | |
| tree | c4d7f26a5bbcf008156428e38ba0a2dfbc932170 | |
| parent | 3010485d44222515f9d07126a7290500f889b54d (diff) | |
| download | php-git-f9532adcc685d78f3a0e163a9231c2c377760846.tar.gz | |
Fix misplaced code
| -rwxr-xr-x | ext/spl/spl_observer.c | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/ext/spl/spl_observer.c b/ext/spl/spl_observer.c index 17ebe086af..13268e9d91 100755 --- a/ext/spl/spl_observer.c +++ b/ext/spl/spl_observer.c @@ -139,6 +139,11 @@ static char *spl_object_storage_get_hash(spl_SplObjectStorage *intern, zval *thi int hash_len = sizeof(zend_object_value); #if HAVE_PACKED_OBJECT_VALUE + + if (hash_len_ptr) { + *hash_len_ptr = hash_len; + } + return (char*)&Z_OBJVAL_P(obj); #else char *hash = emalloc((hash_len+1)*sizeof(char *)); @@ -150,13 +155,13 @@ static char *spl_object_storage_get_hash(spl_SplObjectStorage *intern, zval *thi strncpy(hash, (char *)&zvalue, hash_len); hash[hash_len] = 0; -#endif if (hash_len_ptr) { *hash_len_ptr = hash_len; } - + return hash; +#endif } } |
