createBase64Binary() API too subtle
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
Zorba |
Fix Committed
|
Medium
|
Paul J. Lucas |
Bug Description
ItemFactory contains:
Item createBase64Bin
Item createBase64Bin
The former expects base64-encoded data; the latter expected raw binary data that is then encoded. IMHO, the distinction between char* and unsigned char* is too subtle. You can't tell by looking at a call to either function whether it's calling the first or second -- you have to look up the type of the first argument.
IMHO, it would be better to merge the two functions (that take a const char*) and add a 3rd argument:
bool isEncoded
that explicitly specifies whether the data is encoded or not. This API change should be done for Zorba 3.0. Initially assigned to Matthias for later reassignment.
Related branches
- Chris Hillery: Approve
- Paul J. Lucas: Approve
-
Diff: 1611 lines (+342/-569)16 files modifiedChangeLog (+2/-1)
include/zorba/item_factory.h (+7/-14)
modules/ExternalModules.conf (+2/-2)
modules/com/zorba-xquery/www/modules/http-client.xq.src/http_response_parser.cpp (+1/-1)
src/api/itemfactoryimpl.cpp (+91/-109)
src/api/itemfactoryimpl.h (+1/-4)
src/store/naive/atomic_items.cpp (+3/-3)
src/store/naive/simple_item_factory.cpp (+2/-2)
src/types/casting.cpp (+3/-11)
src/zorbaserialization/serialize_zorba_types.cpp (+6/-26)
src/zorbatypes/binary.cpp (+88/-260)
src/zorbatypes/binary.h (+126/-116)
swig/ItemFactory.h (+4/-11)
swig/ItemFactory.i (+2/-5)
swig/xqj/ZorbaXQConnection.java (+2/-2)
test/api/itemfactory.cpp (+2/-2)
description: | updated |
Changed in zorba: | |
assignee: | Matthias Brantner (matthias-brantner) → Paul J. Lucas (paul-lucas) |
Changed in zorba: | |
status: | New → In Progress |
Changed in zorba: | |
status: | In Progress → Fix Committed |