Diff for /embedaddon/php/win32/registry.c between versions 1.1.1.1 and 1.1.1.2

version 1.1.1.1, 2012/02/21 23:48:06 version 1.1.1.2, 2013/07/22 01:32:15
Line 79  static int LoadDirectory(HashTable *directories, HKEY  Line 79  static int LoadDirectory(HashTable *directories, HKEY 
                                         if ((type == REG_SZ) || (type == REG_EXPAND_SZ)) {                                          if ((type == REG_SZ) || (type == REG_EXPAND_SZ)) {
                                                 if (!ht) {                                                  if (!ht) {
                                                         ht = (HashTable*)malloc(sizeof(HashTable));                                                          ht = (HashTable*)malloc(sizeof(HashTable));
                                                           if (!ht) {
                                                                   return ret;
                                                           }
                                                         zend_hash_init(ht, 0, NULL, ZVAL_INTERNAL_PTR_DTOR, 1);                                                          zend_hash_init(ht, 0, NULL, ZVAL_INTERNAL_PTR_DTOR, 1);
                                                 }                                                  }
                                                 data = (zval*)malloc(sizeof(zval));                                                  data = (zval*)malloc(sizeof(zval));
                                                   if (!data) {
                                                           return ret;
                                                   }
                                                 INIT_PZVAL(data);                                                  INIT_PZVAL(data);
                                                 Z_STRVAL_P(data) = zend_strndup(value, value_len-1);                                                  Z_STRVAL_P(data) = zend_strndup(value, value_len-1);
                                                 Z_STRLEN_P(data) = value_len-1;                                                  Z_STRLEN_P(data) = value_len-1;
                                                   Z_TYPE_P(data) = IS_STRING;
                                                 zend_hash_update(ht, name, name_len+1, &data, sizeof(zval*), NULL);                                                  zend_hash_update(ht, name, name_len+1, &data, sizeof(zval*), NULL);
                                         }                                          }
                                 }                                  }
Line 174  void UpdateIniFromRegistry(char *path TSRMLS_DC) Line 181  void UpdateIniFromRegistry(char *path TSRMLS_DC)
   
         if (!PW32G(registry_directories)) {          if (!PW32G(registry_directories)) {
                 PW32G(registry_directories) = (HashTable*)malloc(sizeof(HashTable));                  PW32G(registry_directories) = (HashTable*)malloc(sizeof(HashTable));
                   if (!PW32G(registry_directories)) {
                           return;
                   }
                 zend_hash_init(PW32G(registry_directories), 0, NULL, delete_internal_hashtable, 1);                  zend_hash_init(PW32G(registry_directories), 0, NULL, delete_internal_hashtable, 1);
                 if (!OpenPhpRegistryKey("\\Per Directory Values", &PW32G(registry_key))) {                  if (!OpenPhpRegistryKey("\\Per Directory Values", &PW32G(registry_key))) {
                         PW32G(registry_key) = NULL;                          PW32G(registry_key) = NULL;

Removed from v.1.1.1.1  
changed lines
  Added in v.1.1.1.2


FreeBSD-CVSweb <freebsd-cvsweb@FreeBSD.org>