diff options
| author | Ted Ross <tross@apache.org> | 2013-07-02 22:29:31 +0000 |
|---|---|---|
| committer | Ted Ross <tross@apache.org> | 2013-07-02 22:29:31 +0000 |
| commit | adf570f71d94fa99f77e69d12283b78bdc7cd60e (patch) | |
| tree | dccac383bd6d7758bfda44b57206bcc57ba2f0e0 /qpid/extras/dispatch/src/iterator.c | |
| parent | d48d6d60421c14c28720f696ffeaeaa9aa096180 (diff) | |
| download | qpid-python-adf570f71d94fa99f77e69d12283b78bdc7cd60e.tar.gz | |
QPID-4974 - Added parsing tests (and fixes for bugs they found).
git-svn-id: https://svn.apache.org/repos/asf/qpid/trunk@1499133 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'qpid/extras/dispatch/src/iterator.c')
| -rw-r--r-- | qpid/extras/dispatch/src/iterator.c | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/qpid/extras/dispatch/src/iterator.c b/qpid/extras/dispatch/src/iterator.c index 43c3b755d0..9186465cde 100644 --- a/qpid/extras/dispatch/src/iterator.c +++ b/qpid/extras/dispatch/src/iterator.c @@ -250,6 +250,22 @@ dx_field_iterator_t* dx_field_iterator_string(const char *text, dx_iterator_view } +dx_field_iterator_t* dx_field_iterator_binary(const char *text, int length, dx_iterator_view_t view) +{ + dx_field_iterator_t *iter = new_dx_field_iterator_t(); + if (!iter) + return 0; + + iter->start_pointer.buffer = 0; + iter->start_pointer.cursor = (unsigned char*) text; + iter->start_pointer.length = length; + + dx_field_iterator_reset_view(iter, view); + + return iter; +} + + dx_field_iterator_t *dx_field_iterator_buffer(dx_buffer_t *buffer, int offset, int length, dx_iterator_view_t view) { dx_field_iterator_t *iter = new_dx_field_iterator_t(); |
