chinaweilu / pb4php

Automatically exported from code.google.com/p/pb4php
0 stars 0 forks source link

Bugs fixes and feature enhancements to pb4php 0.1 #2

Closed GoogleCodeExporter closed 8 years ago

GoogleCodeExporter commented 8 years ago
Below are the code changes of the attached file:

1. The 'import' and 'package' specifiers is supported in 
parser/pb_parser.php
2. Added bytes scalar types to parser/pb_parser.php
3. Fixed a bug in the set_value() function in 
message/encoding/pb_base128.php
   - If the length of $newstring is larger than 32, the following lines 
will result in an integer overflow. Avoid to use bindec() in this case.
     $hexstring = dechex(bindec($newstring));
4. Fixed a bug in the SerializeToString() function in 
message/pb_message.php
   - Use strlen($stringinner) instead of mb_strlen($stringinner), or the 
length might be incorrect if the internal character encoding is UTF8 or 
others.
5. Replace the name of WIRED_STRING with WIRED_LENGTH_DELIMITED, which 
would be a proper name announced by Google.
6. Remove the 'var_dump()' code from message/type/pb_bool.php

Original issue reported on code.google.com by che...@gmail.com on 5 Mar 2009 at 3:45

Attachments:

GoogleCodeExporter commented 8 years ago
bravo, this solved my long long headache issue

Original comment by aql...@gmail.com on 5 Mar 2009 at 3:52

GoogleCodeExporter commented 8 years ago
Sorry, fixed a typo in above report list:

Original one:
"If the length of $newstring is larger than 32, ..."

New one:
"If the length of $newstring is larger than 32*8, ..."

Original comment by che...@gmail.com on 5 Mar 2009 at 3:56

GoogleCodeExporter commented 8 years ago
[25]

Original comment by kordu...@googlemail.com on 23 Mar 2009 at 7:11

GoogleCodeExporter commented 8 years ago
r25 r26 - slightly changed the interface from append_primitive('pr') to
add_primitive('pr') ... so its no difference between primitives and not.

Original comment by kordu...@googlemail.com on 23 Mar 2009 at 7:35

GoogleCodeExporter commented 8 years ago
i removed the changes from the parser cause the interface change is too big. 
for all
other thank to cheton

Original comment by kordu...@googlemail.com on 23 Mar 2009 at 8:21