[Python-checkins] r46543 - python/trunk/Modules/socketmodule.c

neal.norwitz python-checkins at python.org
Tue May 30 05:18:59 CEST 2006


Author: neal.norwitz
Date: Tue May 30 05:18:50 2006
New Revision: 46543

Modified:
   python/trunk/Modules/socketmodule.c
Log:
Simplify further by using AddStringConstant

Modified: python/trunk/Modules/socketmodule.c
==============================================================================
--- python/trunk/Modules/socketmodule.c	(original)
+++ python/trunk/Modules/socketmodule.c	Tue May 30 05:18:50 2006
@@ -4362,10 +4362,8 @@
 	PyModule_AddIntConstant(m, "BTPROTO_SCO", BTPROTO_SCO);
 #endif
 	PyModule_AddIntConstant(m, "BTPROTO_RFCOMM", BTPROTO_RFCOMM);
-	PyModule_AddObject(m, "BDADDR_ANY",
-	                   PyString_FromString("00:00:00:00:00:00"));
-	PyModule_AddObject(m, "BDADDR_LOCAL",
-	                   PyString_FromString("00:00:00:FF:FF:FF"));
+	PyModule_AddStringConstant(m, "BDADDR_ANY", "00:00:00:00:00:00");
+	PyModule_AddStringConstant(m, "BDADDR_LOCAL", "00:00:00:FF:FF:FF");
 #endif
 
 #ifdef HAVE_NETPACKET_PACKET_H


More information about the Python-checkins mailing list