@@ -337,6 +337,36 @@ static PyObject * GeoIP_populate_dict(GeoIP* gi, GeoIPRecord *gir) {
337337 return retval ;
338338}
339339
340+ static PyObject * GeoIP_record_by_addr_v6_Py (PyObject * self , PyObject * args ) {
341+ char * addr ;
342+ GeoIPRecord * gir ;
343+ GeoIP_GeoIPObject * GeoIP = (GeoIP_GeoIPObject * )self ;
344+ if (!PyArg_ParseTuple (args , "s" , & addr )) {
345+ return NULL ;
346+ }
347+ gir = GeoIP_record_by_addr_v6 (GeoIP -> gi , addr );
348+ if (gir == NULL ) {
349+ Py_INCREF (Py_None );
350+ return Py_None ;
351+ }
352+ return GeoIP_populate_dict (GeoIP -> gi , gir );
353+ }
354+
355+ static PyObject * GeoIP_record_by_name_v6_Py (PyObject * self , PyObject * args ) {
356+ char * name ;
357+ GeoIPRecord * gir ;
358+ GeoIP_GeoIPObject * GeoIP = (GeoIP_GeoIPObject * )self ;
359+ if (!PyArg_ParseTuple (args , "s" , & name )) {
360+ return NULL ;
361+ }
362+ gir = GeoIP_record_by_name_v6 (GeoIP -> gi , name );
363+ if (gir == NULL ) {
364+ Py_INCREF (Py_None );
365+ return Py_None ;
366+ }
367+ return GeoIP_populate_dict (GeoIP -> gi , gir );
368+ }
369+
340370static PyObject * GeoIP_record_by_addr_Py (PyObject * self , PyObject * args ) {
341371 char * addr ;
342372 GeoIPRecord * gir ;
@@ -465,8 +495,6 @@ static PyObject * GeoIP_time_zone_by_country_and_region_Py(PyObject *self, PyObj
465495 return Py_BuildValue ("s" , GeoIP_time_zone_by_country_and_region (country_code , region ));
466496}
467497
468-
469-
470498static PyMethodDef GeoIP_Object_methods [] = {
471499 {"country_code_by_name" , GeoIP_country_code_by_name_Py , 1 , "Lookup Country Code By Name" },
472500 {"country_name_by_name" , GeoIP_country_name_by_name_Py , 1 , "Lookup Country Name By Name" },
@@ -490,6 +518,8 @@ static PyMethodDef GeoIP_Object_methods[] = {
490518 {"teredo" , GeoIP_teredo_Py , 1 , "Returns true if teredo is enabled" },
491519 {"id_by_addr" , GeoIP_id_by_addr_Py , 1 , "Lookup Netspeed By IP Address" },
492520 {"id_by_name" , GeoIP_id_by_name_Py , 1 , "Lookup Netspeed By Name" },
521+ {"record_by_addr_v6" , GeoIP_record_by_addr_v6_Py , 1 , "Lookup City Region By IP Address" },
522+ {"record_by_name_v6" , GeoIP_record_by_name_v6_Py , 1 , "Lookup City Region By Name" },
493523 {NULL , NULL , 0 , NULL }
494524};
495525
0 commit comments