Revision: 96
Author: roman_yakovenko
Date: 2006-05-15 00:10:41 -0700 (Mon, 15 May 2006)
ViewCVS: http://svn.sourceforge.net/pygccxml/?rev=96&view=rev
Log Message:
-----------
small improvments
Modified Paths:
--------------
pyplusplus_dev/examples/pyboost_dev/unittests/crc/__init__.py
Modified: pyplusplus_dev/examples/pyboost_dev/unittests/crc/__init__.py
===================================================================
--- pyplusplus_dev/examples/pyboost_dev/unittests/crc/__init__.py 2006-05-15 07:09:55 UTC (rev 95)
+++ pyplusplus_dev/examples/pyboost_dev/unittests/crc/__init__.py 2006-05-15 07:10:41 UTC (rev 96)
@@ -6,8 +6,6 @@
import _crc_
-#print dir( _crc_ )
-
from _crc_ import crc_16_type
from _crc_ import crc_32_type
from _crc_ import crc_ccitt_type
@@ -35,8 +33,12 @@
__all__ = __optimal__ + __basic__
def process_bytes( self, data ):
- for byte in data:
- self.process_byte( byte )
+ if isinstance( data, str ):
+ for byte in data:
+ self.process_byte( ord( byte ) )
+ else:
+ for byte in data:
+ self.process_byte( byte )
for cls in __all__:
cls.process_bytes = process_bytes
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|