@@ -253,30 +253,6 @@ void GeoIP_SetItemInt(PyObject *dict, const char * name, int value) {
253
253
Py_DECREF (valueObj );
254
254
}
255
255
256
- void GeoIP_SetConfItemInt (PyObject * dict , const char * name , int value ) {
257
- PyObject * nameObj ;
258
- PyObject * valueObj ;
259
- nameObj = Py_BuildValue ("s" ,name );
260
- valueObj = value == GEOIP_UNKNOWN_CONF
261
- ? Py_BuildValue ("" )
262
- : Py_BuildValue ("i" ,value );
263
- PyDict_SetItem (dict ,nameObj ,valueObj );
264
- Py_DECREF (nameObj );
265
- Py_DECREF (valueObj );
266
- }
267
-
268
- void GeoIP_SetAccuracyItemInt (PyObject * dict , const char * name , int value ) {
269
- PyObject * nameObj ;
270
- PyObject * valueObj ;
271
- nameObj = Py_BuildValue ("s" ,name );
272
- valueObj = value == GEOIP_UNKNOWN_ACCURACY_RADIUS
273
- ? Py_BuildValue ("" )
274
- : Py_BuildValue ("i" ,value );
275
- PyDict_SetItem (dict ,nameObj ,valueObj );
276
- Py_DECREF (nameObj );
277
- Py_DECREF (valueObj );
278
- }
279
-
280
256
static PyObject * GeoIP_region_populate_dict (GeoIPRegion * gir ) {
281
257
PyObject * retval ;
282
258
const char * region_name = NULL ;
@@ -319,20 +295,6 @@ static PyObject * GeoIP_populate_dict(GeoIP* gi, GeoIPRecord *gir) {
319
295
GeoIP_SetItemInt (retval ,"area_code" ,gir -> area_code );
320
296
}
321
297
322
- /*
323
- * drop support for Confidence and Accuracy Database
324
- * for now
325
-
326
- if ( gi->databaseType != GEOIP_CITY_EDITION_REV1 ){
327
- GeoIP_SetConfItemInt(retval, "country_conf", gir->country_conf );
328
- GeoIP_SetConfItemInt(retval, "region_conf", gir->region_conf );
329
- GeoIP_SetConfItemInt(retval, "city_conf", gir->city_conf );
330
- GeoIP_SetConfItemInt(retval, "postal_conf", gir->postal_conf );
331
-
332
- GeoIP_SetAccuracyItemInt(retval, "accuracy_radius", gir->accuracy_radius );
333
-
334
- */
335
-
336
298
GeoIPRecord_delete (gir );
337
299
return retval ;
338
300
}
0 commit comments