Skip to content

Commit

Permalink
C extension (speeds up simpleion dump/load)
Browse files Browse the repository at this point in the history
  • Loading branch information
cheqianh authored May 29, 2021
1 parent 661ae6b commit 3529e2a
Show file tree
Hide file tree
Showing 11 changed files with 2,126 additions and 155 deletions.
3 changes: 3 additions & 0 deletions MANIFEST.in
Original file line number Diff line number Diff line change
Expand Up @@ -3,3 +3,6 @@ recursive-include tests *.py
graft vectors
global-exclude *.pyc
global-exclude .git*
recursive-include amazon/ion/ion-c-build *
include install.py
include amazon/ion/_ioncmodule.h
19 changes: 19 additions & 0 deletions amazon/ion/_ioncmodule.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
#ifndef _IONCMODULE_H_
#define _IONCMODULE_H_

#include "structmember.h"
#include "decimal128.h"
#include "ion.h"

PyObject* ionc_init_module(void);
iERR ionc_write_value(hWRITER writer, PyObject* obj, PyObject* tuple_as_sexp);
PyObject* ionc_read(PyObject* self, PyObject *args, PyObject *kwds);
iERR ionc_read_all(hREADER hreader, PyObject* container, BOOL in_struct, BOOL emit_bare_values);
iERR ionc_read_value(hREADER hreader, ION_TYPE t, PyObject* container, BOOL in_struct, BOOL emit_bare_values);

iERR _ion_writer_write_symbol_id_helper(ION_WRITER *pwriter, SID value);
iERR _ion_writer_add_annotation_sid_helper(ION_WRITER *pwriter, SID sid);
iERR _ion_writer_write_field_sid_helper(ION_WRITER *pwriter, SID sid);
ION_API_EXPORT void ion_helper_breakpoint(void);

#endif
Loading

0 comments on commit 3529e2a

Please sign in to comment.