Skip to content

Commit 46b4ecc

Browse files
authored
Merge pull request #740 from geoyee/v1.4-andium-dev
Restore `duckdb_gdal_json.patch` format
2 parents 9a77a8e + 8a546c8 commit 46b4ecc

File tree

1 file changed

+26
-26
lines changed

1 file changed

+26
-26
lines changed

vcpkg_ports/gdal/duckdb_gdal_json.patch

Lines changed: 26 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -16,9 +16,9 @@ index 7a23c37..d42a134 100644
1616
--- a/ogr/ogrsf_frmts/geojson/libjson/json_object.c
1717
+++ b/ogr/ogrsf_frmts/geojson/libjson/json_object.c
1818
@@ -285,7 +285,7 @@ static int json_escape_str(struct printbuf *pb, const char *str, size_t len, int
19-
19+
2020
/* reference counting */
21-
21+
2222
-struct json_object *json_object_get(struct json_object *jso)
2323
+struct json_object *gdal__json_object_get(struct json_object *jso)
2424
{
@@ -34,7 +34,7 @@ index 05f25b0..085faca 100644
3434
*/
3535
-JSON_EXPORT struct json_object *json_object_get(struct json_object *obj);
3636
+JSON_EXPORT struct json_object *gdal__json_object_get(struct json_object *obj);
37-
37+
3838
/**
3939
* Decrement the reference count of json_object and free if it reaches zero.
4040
@@ -152,14 +152,14 @@ JSON_EXPORT struct json_object *json_object_get(struct json_object *obj);
@@ -53,7 +53,7 @@ index 05f25b0..085faca 100644
5353
+ * @see gdal__json_object_get()
5454
*/
5555
JSON_EXPORT int json_object_put(struct json_object *obj);
56-
56+
5757
@@ -365,7 +365,7 @@ JSON_C_CONST_FUNCTION(JSON_EXPORT size_t json_c_object_sizeof(void));
5858
*
5959
* If you want to retain a reference to the added object, independent
@@ -90,13 +90,13 @@ index 1d24104..44fa630 100644
9090
tok->depth--;
9191
goto redo_char;
9292
@@ -1209,7 +1209,7 @@ out:
93-
93+
9494
if (tok->err == json_tokener_success)
9595
{
9696
- json_object *ret = json_object_get(current);
9797
+ json_object *ret = gdal__json_object_get(current);
9898
int ii;
99-
99+
100100
/* Partially reset, so we parse additional objects on subsequent calls. */
101101
diff --git a/ogr/ogrsf_frmts/geojson/ogrgeojsonwriter.cpp b/ogr/ogrsf_frmts/geojson/ogrgeojsonwriter.cpp
102102
index 274236e..19f9fdb 100644
@@ -110,16 +110,16 @@ index 274236e..19f9fdb 100644
110110
+ gdal__json_object_get(json_object_array_get_idx(poNativeCoordinates, i)));
111111
}
112112
}
113-
113+
114114
@@ -438,7 +438,7 @@ static void OGRGeoJSONPatchGeometry(json_object *poJSonGeometry,
115115
continue;
116116
}
117-
117+
118118
- json_object_object_add(poJSonGeometry, it.key, json_object_get(it.val));
119119
+ json_object_object_add(poJSonGeometry, it.key, gdal__json_object_get(it.val));
120120
}
121121
}
122-
122+
123123
@@ -617,7 +617,7 @@ json_object *OGRGeoJSONWriteFeature(OGRFeature *poFeature,
124124
}
125125
if (strcmp(it.key, "geometry") == 0)
@@ -132,7 +132,7 @@ index 274236e..19f9fdb 100644
132132
@@ -696,7 +696,7 @@ json_object *OGRGeoJSONWriteFeature(OGRFeature *poFeature,
133133
continue;
134134
}
135-
135+
136136
- json_object_object_add(poObj, it.key, json_object_get(it.val));
137137
+ json_object_object_add(poObj, it.key, gdal__json_object_get(it.val));
138138
}
@@ -159,7 +159,7 @@ index e2a5e2b..2dcc1dd 100644
159159
+ gdal__json_object_get(m_poAttributeFilter);
160160
json_object_array_add(poConfig, m_poAttributeFilter);
161161
}
162-
162+
163163
@@ -1278,7 +1278,7 @@ GIntBig OGRPLScenesDataV1Layer::GetFeatureCount(int bForce)
164164
}
165165
if (m_poAttributeFilter != nullptr)
@@ -168,27 +168,27 @@ index e2a5e2b..2dcc1dd 100644
168168
+ gdal__json_object_get(m_poAttributeFilter);
169169
json_object_array_add(poConfig, m_poAttributeFilter);
170170
}
171-
171+
172172
diff --git a/port/cpl_json.cpp b/port/cpl_json.cpp
173173
index 99b2c7a..5b1778c 100644
174174
--- a/port/cpl_json.cpp
175175
+++ b/port/cpl_json.cpp
176176
@@ -82,7 +82,7 @@ CPLJSONDocument::~CPLJSONDocument()
177177
}
178-
178+
179179
CPLJSONDocument::CPLJSONDocument(const CPLJSONDocument &other)
180180
- : m_poRootJsonObject(json_object_get(TO_JSONOBJ(other.m_poRootJsonObject)))
181181
+ : m_poRootJsonObject(gdal__json_object_get(TO_JSONOBJ(other.m_poRootJsonObject)))
182182
{
183183
}
184-
184+
185185
@@ -93,7 +93,7 @@ CPLJSONDocument &CPLJSONDocument::operator=(const CPLJSONDocument &other)
186-
186+
187187
if (m_poRootJsonObject)
188188
json_object_put(TO_JSONOBJ(m_poRootJsonObject));
189189
- m_poRootJsonObject = json_object_get(TO_JSONOBJ(other.m_poRootJsonObject));
190190
+ m_poRootJsonObject = gdal__json_object_get(TO_JSONOBJ(other.m_poRootJsonObject));
191-
191+
192192
return *this;
193193
}
194194
@@ -202,7 +202,7 @@ void CPLJSONDocument::SetRoot(const CPLJSONObject &oRoot)
@@ -198,10 +198,10 @@ index 99b2c7a..5b1778c 100644
198198
- m_poRootJsonObject = json_object_get(TO_JSONOBJ(oRoot.m_poJsonObject));
199199
+ m_poRootJsonObject = gdal__json_object_get(TO_JSONOBJ(oRoot.m_poJsonObject));
200200
}
201-
201+
202202
/**
203203
@@ -524,7 +524,7 @@ CPLJSONObject::CPLJSONObject(double dfVal)
204-
204+
205205
CPLJSONObject::CPLJSONObject(const std::string &osName,
206206
const CPLJSONObject &oParent)
207207
- : m_poJsonObject(json_object_get(json_object_new_object())), m_osKey(osName)
@@ -210,17 +210,17 @@ index 99b2c7a..5b1778c 100644
210210
json_object_object_add(TO_JSONOBJ(oParent.m_poJsonObject), osName.c_str(),
211211
TO_JSONOBJ(m_poJsonObject));
212212
@@ -532,7 +532,7 @@ CPLJSONObject::CPLJSONObject(const std::string &osName,
213-
213+
214214
CPLJSONObject::CPLJSONObject(const std::string &osName,
215215
JSONObjectH poJsonObject)
216216
- : m_poJsonObject(json_object_get(TO_JSONOBJ(poJsonObject))), m_osKey(osName)
217217
+ : m_poJsonObject(gdal__json_object_get(TO_JSONOBJ(poJsonObject))), m_osKey(osName)
218218
{
219219
}
220-
220+
221221
@@ -561,7 +561,7 @@ CPLJSONObject::~CPLJSONObject()
222222
}
223-
223+
224224
CPLJSONObject::CPLJSONObject(const CPLJSONObject &other)
225225
- : m_poJsonObject(json_object_get(TO_JSONOBJ(other.m_poJsonObject))),
226226
+ : m_poJsonObject(gdal__json_object_get(TO_JSONOBJ(other.m_poJsonObject))),
@@ -235,7 +235,7 @@ index 99b2c7a..5b1778c 100644
235235
+ m_poJsonObject = gdal__json_object_get(TO_JSONOBJ(other.m_poJsonObject));
236236
return *this;
237237
}
238-
238+
239239
@@ -762,7 +762,7 @@ void CPLJSONObject::Add(const std::string &osName, const CPLJSONArray &oValue)
240240
{
241241
json_object_object_add(
@@ -244,7 +244,7 @@ index 99b2c7a..5b1778c 100644
244244
+ gdal__json_object_get(TO_JSONOBJ(oValue.GetInternalHandle())));
245245
}
246246
}
247-
247+
248248
@@ -782,7 +782,7 @@ void CPLJSONObject::Add(const std::string &osName, const CPLJSONObject &oValue)
249249
{
250250
json_object_object_add(
@@ -262,7 +262,7 @@ index 99b2c7a..5b1778c 100644
262262
+ gdal__json_object_get(TO_JSONOBJ(oValue.GetInternalHandle())));
263263
}
264264
}
265-
265+
266266
@@ -812,7 +812,7 @@ void CPLJSONObject::AddNoSplitName(const std::string &osName,
267267
{
268268
json_object_object_add(
@@ -271,13 +271,13 @@ index 99b2c7a..5b1778c 100644
271271
+ gdal__json_object_get(TO_JSONOBJ(oValue.GetInternalHandle())));
272272
}
273273
}
274-
274+
275275
@@ -1479,7 +1479,7 @@ void CPLJSONArray::Add(const CPLJSONObject &oValue)
276276
if (m_poJsonObject && oValue.m_poJsonObject)
277277
json_object_array_add(
278278
TO_JSONOBJ(m_poJsonObject),
279279
- json_object_get(TO_JSONOBJ(oValue.m_poJsonObject)));
280280
+ gdal__json_object_get(TO_JSONOBJ(oValue.m_poJsonObject)));
281281
}
282-
282+
283283
/**

0 commit comments

Comments
 (0)