File tree Expand file tree Collapse file tree 2 files changed +6
-6
lines changed Expand file tree Collapse file tree 2 files changed +6
-6
lines changed Original file line number Diff line number Diff line change @@ -52,7 +52,7 @@ typedef struct {
52
52
size_t allocated_size ;
53
53
size_t size ;
54
54
size_t ref_count ;
55
- bool free_elements ;
55
+ bool owns_elements ;
56
56
} php_phongo_field_path ;
57
57
58
58
typedef struct _php_phongo_field_path_map_element {
@@ -108,7 +108,7 @@ void php_phongo_bson_state_dtor(php_phongo_bson_state* state);
108
108
void php_phongo_bson_state_copy_ctor (php_phongo_bson_state * dst , php_phongo_bson_state * src );
109
109
void php_phongo_bson_typemap_dtor (php_phongo_bson_typemap * map );
110
110
111
- php_phongo_field_path * php_phongo_field_path_alloc (bool free_elements );
111
+ php_phongo_field_path * php_phongo_field_path_alloc (bool owns_elements );
112
112
void php_phongo_field_path_free (php_phongo_field_path * field_path );
113
113
void php_phongo_field_path_write_item_at_current_level (php_phongo_field_path * field_path , const char * element );
114
114
void php_phongo_field_path_write_type_at_current_level (php_phongo_field_path * field_path , php_phongo_bson_field_path_item_types element_type );
Original file line number Diff line number Diff line change @@ -88,18 +88,18 @@ char* php_phongo_field_path_as_string(php_phongo_field_path* field_path)
88
88
return path ;
89
89
}
90
90
91
- php_phongo_field_path * php_phongo_field_path_alloc (bool free_elements )
91
+ php_phongo_field_path * php_phongo_field_path_alloc (bool owns_elements )
92
92
{
93
93
php_phongo_field_path * tmp = ecalloc (1 , sizeof (php_phongo_field_path ));
94
94
tmp -> ref_count = 1 ;
95
- tmp -> free_elements = free_elements ;
95
+ tmp -> owns_elements = owns_elements ;
96
96
97
97
return tmp ;
98
98
}
99
99
100
100
void php_phongo_field_path_free (php_phongo_field_path * field_path )
101
101
{
102
- if (field_path -> free_elements ) {
102
+ if (field_path -> owns_elements ) {
103
103
size_t i ;
104
104
105
105
for (i = 0 ; i < field_path -> size ; i ++ ) {
@@ -135,7 +135,7 @@ void php_phongo_field_path_write_item_at_current_level(php_phongo_field_path* fi
135
135
{
136
136
php_phongo_field_path_ensure_allocation (field_path , field_path -> size );
137
137
138
- if (field_path -> free_elements ) {
138
+ if (field_path -> owns_elements ) {
139
139
field_path -> elements [field_path -> size ] = estrdup (element );
140
140
} else {
141
141
field_path -> elements [field_path -> size ] = (char * ) element ;
You can’t perform that action at this time.
0 commit comments